On Thu, Mar 20, 2008 at 01:39:58PM +0100, Aristotle Pagaltzis wrote:

> (You mean the advent entry.)

I mean the cookbook. I copied the example below straight out of "Access
Control Lists" in Catalyst::Manual::Cookbook

> >    Zoo->deny_access_unless( "/moose_cage", sub {
> >        my $c = shift;
> >           $c->check_roles( "moose_trainer" )
> >        || $c->check_roles( "moose_feeder" );
> >    });



> 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.

>     Zoo->deny_access_unless( '/moose_cage', sub {
>         shift->check_any_user_role( qw( moose_trainer moose_feeder ) );
>     });

Yes, this is the route I ended up taking, and as far as I can tell, it
does what I'm looking for.

Cheers,

Chisel
-- 
Chisel Wright
e: [EMAIL PROTECTED]
w: http://www.herlpacker.co.uk/

  There is no theory of evolution. Just a list of
  creatures Chuck Norris has allowed to live.

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to