Simple implementation of
EffectiveAclsResolver . This implementation does not need to understand the
"recipient" types presented in a BasicAclEntry because it merely delegates to the detected
Authentication.getPrincipal or
Authentication.getAuthorities . The principal object or granted
authorities object has its Object.equals(recipient) method called to make the decision as to whether
the recipient in the BasicAclEntry is the same as the principal or granted authority.
This class should prove an adequate ACLs resolver if you're using standard Acegi Security classes. This is
because the typical Authentication token is UsernamePasswordAuthenticationToken , which
for its principal is usually a String . The GrantedAuthorityImpl is typically
used for granted authorities, which tests for equality based on a String . This means
BasicAclDao s simply need to return a String to represent the recipient. If you use
non-String objects, you will probably require an alternative EffectiveAclsResolver .
author: Ben Alex version: $Id: GrantedAuthorityEffectiveAclsResolver.java 1784 2007-02-24 21:00:24Z luke_t $ |