ACL-Lite
view release on metacpan or search on metacpan
0.0004 Sat Dec 14 10:49:04 2013 CET
[BUG FIXES]
* Prevent Perl warning on undefined permissions parameter.
0.0003 Wed Dec 4 13:13:00 2013 CET
[API CHANGES]
* Add default permissions ("authenticated" or "anonymous") depending
whether you pass uid or not.
0.0002 Wed May 22 15:57:12 2013 CEST
[BUG FIXES]
* Execute POD tests only during release testing.
[ENHANCEMENTS]
$acl = ACL::Lite->new(uid => 666);
$acl->check('authenticated');
DESCRIPTION
`ACL::Lite' is a simple permission checker without any prerequisites.
`ACL' stands for "Access Control Lists".
DEFAULT PERMISSION
The default permission depends on whether you pass a `uid'
(authenticated) or not (anonymous).
CONSTRUCTOR
new
Creates an ACL::Lite object by passing the following parameters:
uid User identifier for authenticated users.
permissions
Granted permissions.
lib/ACL/Lite.pm view on Meta::CPAN
$acl->check('authenticated');
=head1 DESCRIPTION
C<ACL::Lite> is a simple permission checker without any prerequisites.
C<ACL> stands for "Access Control Lists".
=head2 DEFAULT PERMISSION
The default permission depends on whether you pass a C<uid> (authenticated)
or not (anonymous).
=head1 CONSTRUCTOR
=head2 new
Creates an ACL::Lite object by passing the following parameters:
=over 4
lib/ACL/Lite.pm view on Meta::CPAN
for my $perm (split(/$self->{separator}/, $args{permissions})) {
$perm =~ s/^\s+//;
$perm =~ s/\s+$//;
next unless length($perm);
$self->{permissions}->{$perm} = 1;
}
}
}
# add default permissions
if ($self->{uid}) {
$self->{permissions}->{authenticated} = 1;
}
else {
$self->{permissions}->{anonymous} = 1;
}
return $self;
}
( run in 0.400 second using v1.01-cache-2.11-cpan-0a6323c29d9 )