From: http://book.cakephp.org/view/648/Setting-up-permissions

    $group =& $this->User->Group;
    //Allow superadmins to everything
    $group->id = 1;     //if superadmins have $id = 1;
    $this->Acl->allow($group, 'controllers');

    //allow admins
    $group->id = 2;
    $this->Acl->allow($group, 'controllers');
    $this->Acl->deny($group, 'controllers/Users/new_admin');


    //allow users to only add and edit on posts and widgets
    $group->id = 3;
    $this->Acl->deny($group, 'controllers');
    $this->Acl->allow($group, 'controllers/YourController/
new_dealer');
    $this->Acl->allow($group, 'controllers/YourController/
add_review');
.... and so on

All actions accessible by all users should be defined in beforeFilter
in each controller:

$this->Auht->allow('search', ... );

Hope this helps

On Dec 8, 8:05 am, gautam lakum <[email protected]> wrote:
> Hi all,
>
> I am using ACL with my cakePHP application. I want to assign
> permissions to the users. I have groups table, in which I have 3 types
> of groups called
> 1. superadmin
> 2. admin
> 3. member
>
> The permissions are like superadmin can access all the controllers
> actions, admin can also access all the actions but can't access
> new_admin action. new_admin can be accessed only by super admin.
> members can't access admin actions. They can access only login,
> logout, search, profile, new_dealer, add_review actions.
>
> So please help me, what should be there in aros and acos table. and
> also aros_acos table. I am too much confused. If possible, please
> reply with some easy example. I found some e.g. but they were
> confusing me.
>
> Thank you.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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