http://book.cakephp.org/view/648/Setting-up-permissions
function initDB() {
$group =& $this->User->Group;
//Allow admins to everything
$group->id = 1;
$this->Acl->allow($group, 'controllers');
//allow managers to posts and widgets
$group->id = 2;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'controllers/Posts');
$this->Acl->allow($group, 'controllers/Widgets');
//allow users to only add and edit on posts and widgets
$group->id = 3;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'controllers/Posts/add');
$this->Acl->allow($group, 'controllers/Posts/edit');
$this->Acl->allow($group, 'controllers/Widgets/add');
$this->Acl->allow($group, 'controllers/Widgets/edit');
}
On Jul 3, 11:19 pm, randy <ran...@gmail.com> wrote:
> In my aros_acos table, I do not want to have records related to Users
> of my site, I would prefer to establish access rights using the Groups
> for my Users.
>
> In the console I want to setup access rules such as this
>
> cake acl grant Group.1 Widgets/index read;
>
> NOT
>
> cake acl grant User.23 Widgets/index read;
>
> I've looked at a lot of different resources and I can't quite get this
> figured out. The closest I've come so far is a tutorial I found which
> implemented a _checkAccess() routine. Inside this they would call Acl-
>
>
>
>
>
>
>
> >check(). I can post more of that code here if need be.
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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment