1) The syntax in the end is correct.  You could also do:
    cake acl create aro root superadmin

2) When you create a node in the CLI, the model and foreign_key fields
are blank.  If you want these fields added automatically, then you
need to add the nodes from within your application using the models
you created.  I presume you are using the AclBehavior?  Anyways, be
aware that the AclBehavior does NOT create the alias for you, so you
will have to create some coding to handle the alias creation
automatically.

3) I personally feel that it is easier to put the most generic user at
the top of my ARO tree and put the superuser at the bottom.  Let's say
you have a user and an editor.

If the editor is the parent of the user, you would have to do this:

cake acl grant editor articles update
cake acl grant editor articles read
cake acl grant editor articles create
cake acl deny user articles update
cake acl deny user articles create

If the user is the parent of the editor, then this is all you need:

cake acl grant user read
cake acl grant editor create
cake acl grant editor update

-Aran


On Apr 25, 7:19 am, avairet <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I'm trying to use the ACL, but I don't understand some stuff.
>
> I have created the 3 tables (aros, acos, aros_acos) with the CLI.
> Fine.
> I have a Groups table (called 'admin_groupes' in my case).
> I have a Users table (called 'administrateurs' in my case), with a FK
> called "admin_groupe_id"
>
> I want create 3 aros : SuperAdmin, Admin, Redacteur that correspond to
> my AdminGroupes
>
> So, I want create my first aro with the CLI and the mystery start!
> How must I launch my command in CLI?
>
> Because I've tested this :
>
> cake acl create aro AdminGroupe 1 null "Super Admin"
>
> and I've this error message : Could not find parent node using
> reference "AdminGroupe"
>
> If I launch this other command:
>
> cake acl create aro / null "Super Admin"
>
> I obtain this message : New Aro 'null' created.
>
> And finally, if I launch : cake acl create aro / "Super Admin", that
> works fine, but the "model" and "foreign_key" fields from my aros
> table are empty... Why? Is it normal?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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