Data::ACL - Perl extension for simple ACL lists
use Data::ACL; use Set::NestedGroups; # You should acquire this module from CPAN my $groups = new Set::NestedGroups; $groups->add('root', 'wheel'); $groups->add('wheel', 'staff'); $groups->add('webmaster', 'staff'); # See Set::NestedGroups documentation my $acl = new Data::ACL($groups); my $web = $acl->Realm("web"); $web->Deny('all'); $web=>Allow('staff'); $web->Deny('.boss'); # User boss, not group &DenyAccess unless $acl->IsAuthorized($user, 'web');
This module implements Deny/Allow series, and requires Set::NestedGroups to define the groups.
Permissions are given per realm. A special realm called 'all' may contain prerequisites for all other realms. If evaluating that realm results in denying access, the specific realm is not evaluated. Otherwise evaluation proceeds to it.
Ariel Brosh, schop@cpan.org
This module is distributed under the same terms as Perl itself.
Commercial support may be obtained via Raz Information Systems, Israel, raz@raz.co.il. No royalty is needed whatsoever for using the module, including in commercial applications.
perl(1), Set::NestedGroups.
To install Data::ACL::Realm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::ACL::Realm
CPAN shell
perl -MCPAN -e shell install Data::ACL::Realm
For more information on module installation, please visit the detailed CPAN module installation guide.