Spring Security Framework

org.springframework.security.acl.basic
Class GrantedAuthorityEffectiveAclsResolver

java.lang.Object
  extended by org.springframework.security.acl.basic.GrantedAuthorityEffectiveAclsResolver
All Implemented Interfaces:
EffectiveAclsResolver

Deprecated. Use new spring-security-acl module instead

public class GrantedAuthorityEffectiveAclsResolver
extends Object
implements EffectiveAclsResolver

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 Spring 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 BasicAclDaos simply need to return a String to represent the recipient. If you use non-String objects, you will probably require an alternative EffectiveAclsResolver.

Version:
$Id$
Author:
Ben Alex

Constructor Summary
GrantedAuthorityEffectiveAclsResolver()
          Deprecated.  
 
Method Summary
 AclEntry[] resolveEffectiveAcls(AclEntry[] allAcls, Authentication filteredBy)
          Deprecated. Determines the ACLs that apply to the presented Authentication object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrantedAuthorityEffectiveAclsResolver

public GrantedAuthorityEffectiveAclsResolver()
Deprecated. 
Method Detail

resolveEffectiveAcls

public AclEntry[] resolveEffectiveAcls(AclEntry[] allAcls,
                                       Authentication filteredBy)
Deprecated. 
Description copied from interface: EffectiveAclsResolver
Determines the ACLs that apply to the presented Authentication object.

Specified by:
resolveEffectiveAcls in interface EffectiveAclsResolver
Parameters:
allAcls - every ACL assigned to a domain object instance
filteredBy - the principal (populated with GrantedAuthoritys along with any other members that relate to role or group membership) that effective ACLs should be returned for
Returns:
the ACLs that apply to the presented principal, or null if there are none after filtering

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.