ACL-Lite
view release on metacpan or search on metacpan
Revision history for ACL::Lite
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
t/01-simple.t view on Meta::CPAN
isa_ok($acl, 'ACL::Lite');
ok($acl->check('foo') eq 'foo');
ok($acl->check('bar') eq 'bar');
ok($acl->check(['foo', 'bar']) eq 'foo');
ok(! defined($acl->check('baz')));
test_return_of_permissions($acl);
# anonymous and authenticated permissions
$acl = ACL::Lite->new(permissions => '', uid => undef);
isa_ok($acl, 'ACL::Lite');
$ret = $acl->check('anonymous');
ok(defined $ret && $ret eq 'anonymous', 'Check for anonymous permission of anonymous user.')
|| diag "Return value: $ret:";
$ret = $acl->check('authenticated');
ok(! defined($ret), 'Check for authenticated permission of anonymous user.')
|| diag "Return value: $ret.";
( run in 2.703 seconds using v1.01-cache-2.11-cpan-d80b1682f3f )