mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-22 20:12:14 +00:00
Fixed GrantedAuthorityEffectiveAclsResolver if null ACLs provided to method.
This commit is contained in:
parent
eb9c7d0852
commit
3f87849f31
@ -6,6 +6,7 @@ Changes in version 0.x (2004-xx-xx)
|
||||
* Extracted removeUserFromCache(String) to UserCache interface
|
||||
* Fixed EH-CACHE-based caching implementation behaviour when cache exists
|
||||
* Fixed Ant "release" target not including project.properties
|
||||
* Fixed GrantedAuthorityEffectiveAclsResolver if null ACLs provided to method
|
||||
* Documentation improvements
|
||||
|
||||
Changes in version 0.6 (2004-08-09)
|
||||
|
@ -59,6 +59,10 @@ public class GrantedAuthorityEffectiveAclsResolver
|
||||
|
||||
public AclEntry[] resolveEffectiveAcls(AclEntry[] allAcls,
|
||||
Authentication filteredBy) {
|
||||
if ((allAcls == null) || (allAcls.length == 0)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List list = new Vector();
|
||||
|
||||
for (int i = 0; i < allAcls.length; i++) {
|
||||
|
@ -104,6 +104,11 @@ public class GrantedAuthorityEffectiveAclsResolverTests extends TestCase {
|
||||
resolver.resolveEffectiveAcls(acls, scott)[2]);
|
||||
}
|
||||
|
||||
public void testResolveAclsReturnsNullIfNoAclsInFirstPlace() {
|
||||
GrantedAuthorityEffectiveAclsResolver resolver = new GrantedAuthorityEffectiveAclsResolver();
|
||||
assertNull(resolver.resolveEffectiveAcls(null, scott));
|
||||
}
|
||||
|
||||
public void testSkipsNonBasicAclEntryObjects() {
|
||||
GrantedAuthorityEffectiveAclsResolver resolver = new GrantedAuthorityEffectiveAclsResolver();
|
||||
AclEntry[] basicAcls = {entry100Marissa, entry100Scott, entry100RoleEverybody, entry100RoleOne, new MockAcl(), entry100RoleTwo};
|
||||
|
Loading…
x
Reference in New Issue
Block a user