Maypole::Plugin::Authorization

Maypole::Plugin::Authorization is a Perl module that provides a role-based authorization for Maypole applications.
Download

Maypole::Plugin::Authorization Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dave Howorth
  • Publisher web site:
  • http://search.cpan.org/~djh/Maypole-Plugin-Authorization-0.10/lib/Maypole/Plugin/Authorization.pm

Maypole::Plugin::Authorization Tags


Maypole::Plugin::Authorization Description

Maypole::Plugin::Authorization is a Perl module that provides a role-based authorization for Maypole applications. Maypole::Plugin::Authorization is a Perl module that provides a role-based authorization for Maypole applications.SYNOPSIS # In your main application driver class ... package BeerDB; use Maypole::Application qw( Authentication::UserSessionCookie Authorization); use Maypole::Constants; # Configuration will depend on the database design, which loader is # used etc, so this is just one possibility ... BeerDB->config->auth({ user_class => 'BeerDB::Users', # other keys may be needed as well for the authentication module }); sub authenticate { my ($self, $r) = @_; ... if ($self->authorize($r)) { return OK; } else { # take application-specific authorization failure action ... } ... } # make web page show just tables for this user sub additional_data { my $r = shift; $r->config->display_tables( ); } # meanwhile in a template somewhere ... Can be used to decide whether to display an edit button, for exampleThis module provides simple role-based authorization for Maypole. It uses the database to store permissions, which fits well with Maypole.It determines whether users are authorized to invoke specific methods in classes. Normally these will be actions in model classes. Permission to invoke methods is not granted directly; it is assigned to roles, and each user may be assigned one or more roles.The methods made available in your request object are described next, followed by an example database schema. Then we explain how you can customize the schema using configuration. Finally there are some hints on how to administer the database tables and a list of the various use cases associated with authorization. Requirements: · Perl


Maypole::Plugin::Authorization Related Software