Changeset 29107

Show
Ignore:
Timestamp:
01/17/08 16:05:17 (11 months ago)
Author:
ogrisel
Message:

NXP-1948: ACPImpl.getMergedACLs should never return null but an empty ACL instead

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/security/impl/ACPImpl.java

    r29102 r29107  
    146146 
    147147    public ACL getMergedACLs(String name) { 
    148         if (acls.isEmpty()) { 
    149             return null; 
    150         } 
    151148        ACL mergedAcl = new ACLImpl(name, true); 
    152149        for (ACL acl : acls) { 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-jcr-connector/src/main/java/org/nuxeo/ecm/core/repository/jcr/JCRSecurityManager.java

    r28106 r29107  
    425425            if (acp != null) { 
    426426                ACL acl = acp.getMergedACLs(ACL.INHERITED_ACL); 
    427                 if (acl != null) { 
    428                     if (inheritedAcls == null) { 
    429                         inheritedAcls = acl; 
    430                     } else { 
    431                         inheritedAcls.addAll(acl); 
    432                     } 
     427                if (inheritedAcls == null) { 
     428                    inheritedAcls = acl; 
     429                } else { 
     430                    inheritedAcls.addAll(acl); 
    433431                } 
    434432                if (acp.getAccess(SecurityConstants.EVERYONE,