Abilities

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

            if ($user->can_perform('something')) {
                    do_something();
            } else {
                    die "Hey you can't do that, you can only do " . join(', ', keys %{$user->abilities});
            }

DESCRIPTION
    Abilities is a simple yet powerful mechanism for authorizing users of
    web applications (or any applications) to perform certain actions in the
    application. This is an extension of the familiar role-based access
    control that is common in various systems and frameworks like Catalyst
    (See Catalyst::Plugin::Authorization::Roles for the role-based
    implementation and Catalyst::Plugin::Authorization::Abilities for the
    ability-based implementation that inspired this module).

    As opposed to role-based access control - where users are allowed access
    to a certain feature (here called 'action') only through their
    association to a certain role that is hard-coded into the program - in
    ability-based acccess control, a list of actions is assigned to every
    user, and they are only allowed to perform these actions. Actions are
    not assigned by the developer during development, but rather by the

lib/Abilities.pm  view on Meta::CPAN

		do_something();
	} else {
		die "Hey you can't do that, you can only do " . join(', ', keys %{$user->abilities});
	}

=head1 DESCRIPTION

Abilities is a simple yet powerful mechanism for authorizing users of web
applications (or any applications) to perform certain actions in the application. This is an
extension of the familiar role-based access control that is common in
various systems and frameworks like L<Catalyst> (See L<Catalyst::Plugin::Authorization::Roles>
for the role-based implementation and L<Catalyst::Plugin::Authorization::Abilities>
for the ability-based implementation that inspired this module).

As opposed to role-based access control - where users are allowed access
to a certain feature (here called 'action') only through their association
to a certain role that is hard-coded into the program - in ability-based
acccess control, a list of actions is assigned to every user, and they are
only allowed to perform these actions. Actions are not assigned by the
developer during development, but rather by the end-user during deployment.
This allows for much more flexibility, and also speeds up development,



( run in 2.013 seconds using v1.01-cache-2.11-cpan-e1769b4cff6 )