Ignore:
Timestamp:
08/10/09 01:04:07 (15 years ago)
Author:
nanardon
Message:
  • allow to match authenticated and anonymous users in acls
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Acls.pm

    r317 r321  
    4343=item an attribute of the accessed object which should contains the username, 
    4444prefixed by '$' 
     45 
     46=item C<*> to math any user 
     47 
     48=item @authenticated or @anonymous for any authenticated user and non 
     49authenticated user ('*' include both) 
    4550 
    4651=back 
     
    193198        } elsif ($u->{user} eq '*' || $u->{user} eq $who) { 
    194199            return $u->{$perm} || 0; 
     200        } elsif (lc($u->{user}) eq '@authenticated' && $who) { 
     201            return $u->{$perm} || 0; 
     202        } elsif (lc($u->{user}) eq '@anonymous' && $who eq "") { 
     203            return $u->{$perm} || 0; 
    195204        } else { 
    196205            return 
Note: See TracChangeset for help on using the changeset viewer.