1 package Catalyst
::Plugin
::Authorization
::ACL
::Paranoid
;
2 use base qw
/Class::Data::Inheritable/;
4 # based upon Catalyst::Plugin::Authorization::ACL;
10 use Catalyst
::Plugin
::Authorization
::ACL
::Paranoid
::Engine
;
14 BEGIN { __PACKAGE__
->mk_classdata( '_acl_engine' ) }
18 my $ret = $c->NEXT::setup_actions
( @_ );
21 Catalyst
::Plugin
::Authorization
::ACL
::Paranoid
::Engine
->new( $c ) );
27 my ( $c, $class, $action ) = @_;
29 local $NEXT::NEXT{ $c, "execute" };
31 if ( Scalar
::Util
::blessed
( $action ) ) {
32 unless ( $c->_acl_engine->is_allowed( $c, $class, $action ) ) {
33 $c->res->status( 403 );
34 $c->error( 'Access denied' );
39 $c->NEXT::execute
( $class, $action );
48 $c->_acl_engine->rules( \
%rules );
57 This program is free software, you can redistribute it and/or modify it under
58 the same terms as Perl itself.