debian man page for apache2::sitecontrol::rule

Query: apache2::sitecontrol::rule

OS: debian

Section: 3pm

Links: debian man pages | All man pages

Forums: Unix Linux Community | Forum Categories

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

Apache2::SiteControl::Rule(3pm) 			User Contributed Perl Documentation			   Apache2::SiteControl::Rule(3pm)

NAME
Apache2::SiteControl::Rule - Permission manager access rule. DESCRIPTION Each rule is a custom-written class that implements some aspect of your site's access logic. Rules can choose to grant or deny a request. package sample::Test; use strict; use warnings; use Carp; use Apache2::SiteControl::Rule; use base qw(Apache2::SiteControl::Rule); sub grants($$$$) { my $this = shift; my $user = shift; my $action = shift; my $resource = shift; if($action eq "edit" && $resource->isa("sample::Record")) { return 1 if($user{name} eq "root"); } return 0; } sub denies($$$$) { return 0; } 1; The PermissionManager will only give permission if at least one rule grants permission, and no rule denies it. It is important that your rules never grant or deny a request they do not understand, so it is a good idea to use type checking to prevent strangeness. Assertions should not be used if you expect different rules to accept different resource types or user types, since each rule is used on every access request.
EXPORT
None by default.
SEE ALSO
Apache2::SiteControl::UserFactory, Apache::SiteControl::ManagerFactory, Apache2::SiteControl::PermissionManager, Apache::SiteControl
AUTHOR
This module was written by Tony Kay, <tkay@uoregon.edu>.
COPYRIGHT AND LICENSE
perl v5.14.2 2006-03-17 Apache2::SiteControl::Rule(3pm)
Related Man Pages
apache2::mpm(3) - osx
apache2::filterrec(3) - osx
apr::request::apache2(3pm) - debian
apache2::filterrec(3pm) - debian
apache2::sitecontrol(3pm) - debian
Similar Topics in the Unix Linux Community
Muttering About Rules and CEP
Infraction for hackware: Multiple Rule Violations, Trolling
About CK ERP
A little help with SMC
Regex based Rule engine.