diff --git a/source/java/org/alfresco/repo/security/permissions/impl/PermissionServiceImpl.java b/source/java/org/alfresco/repo/security/permissions/impl/PermissionServiceImpl.java index 8a05581974..28c29d759c 100644 --- a/source/java/org/alfresco/repo/security/permissions/impl/PermissionServiceImpl.java +++ b/source/java/org/alfresco/repo/security/permissions/impl/PermissionServiceImpl.java @@ -328,19 +328,23 @@ public class PermissionServiceImpl implements PermissionServiceSPI, Initializing // If the node ref is null there is no sensible test to do - and there // must be no permissions // - so we allow it - if (nodeRef == null) { return AccessStatus.ALLOWED; } // If the permission is null we deny - if (perm == null) { return AccessStatus.DENIED; } - + + // Allow permissions for nodes that do not exist + if (!nodeService.exists(nodeRef)) + { + return AccessStatus.ALLOWED; + } + // Get the current authentications // Use the smart authentication cache to improve permissions performance Authentication auth = authenticationComponent.getCurrentAuthentication(); @@ -355,13 +359,6 @@ public class PermissionServiceImpl implements PermissionServiceSPI, Initializing return status; } - // Allow permissions for nodes that do not exist - if (!nodeService.exists(nodeRef)) - { - accessCache.put(key, AccessStatus.ALLOWED); - return AccessStatus.ALLOWED; - } - // If the node does not support the given permission there is no point // doing the test Set available = modelDAO.getAllPermissions(nodeRef);