Catalyst-Plugin-Authorization-ACL

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    acl_access_allowed
        A no-op

    acl_access_denied
        Looks for a private action named "access_denied" from the denied
        action's controller and outwards (much like "auto"), and if none is
        found throws an access denied exception.

    forcibly_allow_access
        Within an "access_denied" action this will immediately cause the
        blocked action to be executed anyway.

    This means that you have several alternatives:

  Provide an "access_denied" action
        package MyApp::Controller::Foo;

        sub access_denied : Private {
            my ( $self, $c, $action ) = @_;

            ...
            $c->forcibly_allow_access
                if $you->mean_it eq "really";
        }

    If you call "forcibly_allow_access" then the blocked action will be
    immediately unblocked. Otherwise the execution of the action will cease,
    and return to it's caller or end.

  Cleanup in "end"
        sub end : Private {
            my ( $self, $c ) = @_;

            if ( $c->error and $c->error->[-1] eq "access denied" ) {
                $c->error(0); # clear the error

                # access denied

lib/Catalyst/Plugin/Authorization/ACL.pm  view on Meta::CPAN

A no-op

=item acl_access_denied

Looks for a private action named C<access_denied> from the denied action's
controller and outwards (much like C<auto>), and if none is found throws an
access denied exception.

=item forcibly_allow_access

Within an C<access_denied> action this will immediately cause the blocked
action to be executed anyway.

=back

This means that you have several alternatives:

=head2 Provide an C<access_denied> action

    package MyApp::Controller::Foo;

    sub access_denied : Private {
        my ( $self, $c, $action ) = @_;

        ...
        $c->forcibly_allow_access
            if $you->mean_it eq "really";
    }

If you call C<forcibly_allow_access> then the blocked action will be
immediately unblocked. Otherwise the execution of the action will cease, and
return to it's caller or end.

=head2 Cleanup in C<end>

    sub end : Private {
        my ( $self, $c ) = @_;

        if ( $c->error and $c->error->[-1] eq "access denied" ) {
            $c->error(0); # clear the error



( run in 0.826 second using v1.01-cache-2.11-cpan-49f99fa48dc )