Wallet::ACL::Nested3pm
Wallet acl verifier to check another acl
Usage
my $verifier = Wallet::ACL::Nested->new;my $status = $verifier->check ($principal, $acl);if (not defined $status) {die "Something failed: ", $verifier->error, "\n";} elsif ($status) {print "Access granted\n";} else {print "Access denied\n";}
Overview
Wallet::ACL::Nested checks whether the principal is permitted by another named ACL and, if so, returns success. It is used to nest one ACL inside another.
Methods
new()-
Creates a new ACL verifier.
- check(PRINCIPAL, ACL)
-
Returns true if PRINCIPAL is granted access according to the nested ACL, specified by name. Returns false if it is not, and undef on error.
- error([ERROR ...])
-
Returns the error of the last failing operation or undef if no operations have failed. Callers should call this function to get the error message after an undef return from any other instance method. The returned errors will generally come from the nested child ACL.