exactly what I needed, appreciated.
Chris.
On Apr 11, 6:10 pm, aranworld <[EMAIL PROTECTED]> wrote:
> In your example, you want to do:
>
> cake acl create aro root chris
>
> which will allow you to do:
>
> $this->Acl->check('chris', 'users/add', '*');
>
> In this situation, the model and foreign_id fields will be blank.
>
> However, Auth, when it performs check() is only using alias, so
> strictly speaking, the model and foreign_id fields are not needed.
>
> BUT...
>
> The model and foreign_id fields WILL be used by the Acl Behavior if
> you use it.
>
> If you are using the Acl Behavior, and it is properly configured, then
> when you create a new User or Group, the new Aro node will
> automatically be created at the same time with matching model and
> foreign_id fields, but NOT alias.
>
> Since the Auth Component relies on an alias, you will have to set the
> alias manually in an afterSave function in your User model.
>
> As a general rule of thumb, the alias field is used more oftne than
> the model and foreign_id fields are.
>
> On Apr 11, 9:55 am, genfish <[EMAIL PROTECTED]> wrote:
>
> > So let me get this right (first time i've done this) :)
>
> > I have a model, user.php which contains the columns `id` and `name`.
> > A row in the table for this model contains ( 1, 'chris').
>
> > i create an ARO like this;
> > ./cake acl create aro root user.1
>
> > So now when i call $this->Acl->check('chris', 'users/add', '*');
>
> > this will ask if the user named chris (who is the first ARO) can have
> > access to the controller/action users/add.
>
> > Is this correct?
>
> > I am a little confused because when I do ./cake acl view aro it
> > displays the id [1] but there is no string after this to refer to the
> > ARO.
>
> > Thanks in advance,
>
> > Chris
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---