Decision::ACL

Manage and Build Access Control Lists
Download

Decision::ACL Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Benoit Beausejour
  • Publisher web site:
  • http://search.cpan.org/~bbeausej/

Decision::ACL Tags


Decision::ACL Description

Manage and Build Access Control Lists Decision::ACL is a Perl module that provides an already implemented ACL logic for programmers. Most of the time writing access control list scripts is long and boring. This set of modules has all the convenient logic behind access control lists and provide an easy interface to it. It allows you to build custom ACL's, and provide the mechanisms to run the ACL against data.SYNOPSIS use Decision::ACL; use Decision::ACL::Rule; use Decision::ACL::Constants qw(:rule); my $Acl = Decision::ACL->new(); my $rule = Decision::ACL::Rule({ action => 'allow', now => 0, fields => { field1 => 'field1val', field2 => 'field2val', ... } }); ... $Acl->PushRule($rule); my $return_status = $Acl->RunACL({ field1 => 'testfield1value', field2 => 'testfield2value', ... }); if($return_status == ACL_RULE_ALLOW) { print "testfield1value, testfield2value allowed!\n"; } $Acl->PushRule($rule); Push a rule onto the Decision::ACL rule list. $Acl->PopRule(); Pop a rule from the Decision::ACL rule list. $Acl->ShiftRule(); Shift a rule from the Decision::ACL rule list. $Acl->UnshiftRule($rule); Unshift a rule onto the Decision::ACL rule list. $Acl->Rules(); Return an arrayref of the rule objects in this rule list. $Acl->RunACL({ args }); Run the list, Returns ACL_RULE_ALLOW or ACL_RULE_DENY. $rule->Fields(); Returns a has reference of the fields and values for this rule. $rule->Now(); Wether this rule has to be applied now or not. 1 or 0. $rule->Action(); Returns the action for this rule, either ALLOW or DENY. $rule->Concerned({}); Is rule concerned by data ? Returns ACL_RULE_CONCERNED or ACL_RULE_UNCONCERNED $rule->Control({}); Test rule against data, returns status of rule. Requirements: · Perl


Decision::ACL Related Software