[Catalyst] Re: ACL confusion

Aristotle Pagaltzis pagaltzis at gmx.de
Thu Mar 20 22:25:31 GMT 2008


* Chisel Wright <chisel at herlpacker.co.uk> [2008-03-20 21:05]:
> On Thu, Mar 20, 2008 at 01:39:58PM +0100, Aristotle Pagaltzis wrote:
> > But you can write multiple rules for the same action; why not
> > do it that way?
> > 
> >     __PACKAGE__->deny_access_unless( '/books/delete', [ $_ ] )
> >         for qw/user admin/;
> 
> Because it still behaves in an AND-like manner.

Bah, it’s actually documented too. I just missed it. However, if
I read the POD right, it *should* work like this:

    __PACKAGE__->allow_access_if( '/books/delete', [ $_ ] )
        for qw/user admin/;
    __PACKAGE__->deny_access( '/books/delete' );

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list