logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Wallet::ACL::Nested - Wallet ACL verifier to check another ACL

Author

       Jon Robertson <jonrober@stanford.edu>

perl v5.40.0                                       2024-11-12                           Wallet::ACL::Nested(3pm)

Description

       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.

Name

       Wallet::ACL::Nested - Wallet ACL verifier to check another ACL

See Also

Wallet::ACL(3), wallet-backend(8)

       This  module   is   part   of   the   wallet   system.    The   current   version   is   available   from
       <https://www.eyrie.org/~eagle/software/wallet/>.

Synopsis

           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";
           }

See Also