2009年6月23日星期二

Re: [fw-auth] Acl with modules syntax doubt

-- whisher <whisher@mp4.it> wrote
(on Tuesday, 23 June 2009, 02:38 PM -0700):
> I'm set up an acl system with modules.
> This code works fine but I've never seen
> this syntax in the reference manual so
> I'm asking for advice.
>
> the code
>
> <pre>
> $this->_acl->allow('member','users');
> $this->_acl->allow('member', 'users:index');
> //$this->_acl->allow('member','users','index'); it doesn't work

The last argument should be an array of strings.

> </pre>
>
> Member has privileges to access to my
> modules users
> controller index
> action index
>
> Can you enlighten me, please ?

One more note -- the roles and resources must be defined *before* you
set the permissions -- otherwise you'll get an error. The resource and
role names must match those that you've defined as well.

--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: