Re: ACL - delete groups?
Thanks, Jeremy - that's just the answer I needed. The docs seemed to indicate that this type of handling would be taken care of by the Acl component of Cake, so thanks for clearing it up. I appreciate the help!
Best,
Adam
On Thursday, 18 October 2012 00:49:54 UTC-4, Jeremy Burns wrote:
-- On Thursday, 18 October 2012 00:49:54 UTC-4, Jeremy Burns wrote:
The first thing to fix is referential integrity in your database so that a group that has users cannot be deleted. If your db won't support RI (if you're using MyIsam instead of InnoDB, for example) then at least put some checks in your code before you do the delete. If you don't, the users belong to a now vanished group. That will confuse the Acl tables as they do not deploy RI out of the box (they should have relations between aros => aros_acos <= acos, but they don't), and even then it's hard to restrict group deletes there as the foreign key to either groups.id or users.id is stored in the same field in the aros table, although you can add RI from aros.parent_id => aros.id. If the group that contains the users is removed from the aros table, the parent id points to an id that doesn't exist and the code will explode.Class Outfit
Jeremy Burns
http://www.classoutfit.comOn 18 Oct 2012, at 04:53:25, Vanja Dizdarević <lex.non...@gmail.com> wrote:Can you post some code maybe?
On Thursday, October 18, 2012 1:25:22 AM UTC+2, Adam Strom wrote:Hi All -I've completed the Acl tutorial in the 2.0 docs and it says: "...anytime you create or delete a user/group the Aro table is updated."Yet when I delete a group that has users assigned to it, any further edits to those users throws an error:"Error: [CakeException] AclNode::node() - Couldn't find Aro node identified by "Array([Aro0.model] => User[Aro0.foreign_key] => 16)"Even if I assign them to an existing group, the update occurs within the Users table but the aros table never gets a new entry for that user.Any thoughts?Thanks!Adam--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake...@googlegroups.com.
To unsubscribe from this group, send email to cake-php+u...@googlegroups.com .
Visit this group at http://groups.google.com/group/cake-php?hl=en .
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home