AD,
Thanks for the advice. Setting the parent to NULL, then setting the
parent to the target parent worked out great.
Brandon

On Sep 4, 5:35 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Sep 4, 10:50 pm, "[EMAIL PROTECTED]"
>
>
>
> <[EMAIL PROTECTED]> wrote:
> > I am having an issue with ACL. I have tried doing an $aro->setParent
> > on an ARO object and I've also tried using the acl.php script that
> > comes with CakePHP and both of them fail when setting the parent on a
> > certain ARO. I've narrowed down where the code returns FALSE in the
> > setParent function, but I don't know exactly why this is. The code is
> > in the setParent function of cake/libs/controller/components/dbacl/
> > models/aclnode.php and is this check:
>
> > ($parentId != null && $newParent['lft'] <= $object['lft'] &&
> > $newParent['rght'] >= $object['rght']) on line 178 of the current
> > stable release.
>
> > My layout is:
> >                                    1[ROOT]10
> >                            2[MEMBERS]9
> >              3[ADMINISTRATORS]8
> > 4[PERSON1]5 6[PERSON2]7
>
> > I'm trying to set Person1 to have the parent of Members instead of
> > Administrators and it fails during the check above. Why is this?
>
> Hi,
>
> It adds a bit of complexity to 'promote' (in terms of position, in
> this context it would be a demotion) a node, and in 1.1 with acl it's
> a case which is not catered for. There's an easy work around however,
> set the parent to null (so it is moved out of the tree), and
> immediately set the parent to the id of the parent that you want.
>
> hth,
>
> AD


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to