debian man page for cgi::application::plugin::authorization::driver::simplegroup

Query: cgi::application::plugin::authorization::driver::simplegroup

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

CGI
::Application::Plugin::Authorization::Driver::SimpleGUser(Contributed Perl DocCGI::Application::Plugin::Authorization::Driver::SimpleGroup(3pm)
NAME
CGI::Application::Plugin::Authorization::Driver::SimpleGroup - Simple Group based Authorization driver
SYNOPSIS
use base qw(CGI::Application); use CGI::Application::Plugin::Authorization; __PACKAGE__->authz->config( DRIVER => [ 'SimpleGroup' ], # You are responsible for setting a group param somehow! GET_USERNAME => sub { my $authz = shift; return $authz->cgiapp->session->param('group') }, );
DESCRIPTION
This driver achieves simplicity by assuming that the "username" method of CGI::Application::Plugin::Authorization will return a group rather than a username. Thus it can be directly compared with the list of authorized groups passed to authorize
EXAMPLE
use base qw(CGI::Application); use CGI::Application::Plugin::Authorization; __PACKAGE__->authz->config( DRIVER => [ 'SimpleGroup' ], # You are responsible for setting a group param somehow! GET_USERNAME => sub { my $authz = shift; return $authz->cgiapp->session->param('group'); }, ); sub cgiapp_prerun { my $self = shift; # here is an example of how you could set the # group param that will be tested later if ($ENV{REMOTE_USER} eq 'mark') { $self->session->param('group' => 'admin'); } } sub my_runmode { my $self = shift; # make sure the user has 'admin' privileges return $self->authz->forbidden unless $self->authz->authorize('admin'); # if we get here the user has 'admin' privileges }
METHODS
authorize_user This method is not intended to be used directly. Just follow the SYNOPSIS. This method accepts a username followed by a list of group names and will return true if the user belongs to at least one of the groups.
SEE ALSO
CGI::Application::Plugin::Authorization::Driver, CGI::Application::Plugin::Authorization, perl(1)
LICENCE AND COPYRIGHT
Copyright (c) 2006, Mark Stosberg. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2011-05-04 CGI::Application::Plugin::Authorization::Driver::SimpleGroup(3pm)
Related Man Pages
cgi::application::plugin::anytemplate::driver::htmltemplateexpr(3pm) - debian
cgi::application::plugin::anytemplate::driver::htmltemplateplugg(3pm) - debian
cgi::application::plugin::authentication::driver::dbic(3pm) - debian
cgi::application::plugin::authorization(3pm) - debian
cgi::application::plugin::authorization::driver::dummy(3pm) - debian
Similar Topics in the Unix Linux Community
CGI::Application 4.21 (Default branch)
Kerberize Application host
File size issue in Sol 5.9
Major Application
Tech Article: Accelerating Multimedia Application Development with JSR 309 Media Server Control API