mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
. Fix to Permissions Cache to handle deleted nodes in correct order (i.e. before accessing the cache)
- fixes issue highlighted by ACLEntryVoterTest git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2076 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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<PermissionReference> available = modelDAO.getAllPermissions(nodeRef);
|
||||
|
Reference in New Issue
Block a user