mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
REPO-1681 / MNT-17228: CMIS: Attempt to delete non-current version throws "Unexpected: current version does not appear ..."
- code review change. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133961 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1785,8 +1785,9 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
|
||||
}
|
||||
else if (info.isVariant(CMISObjectVariant.VERSION))
|
||||
{
|
||||
// Check the DELETE permission since the version service has no restrictions.
|
||||
if (connector.getServiceRegistry().getPermissionService().hasPermission(nodeRef, PermissionService.DELETE) != AccessStatus.ALLOWED)
|
||||
// Check the DELETE permission since the version service has no restrictions.
|
||||
AccessStatus perm = connector.getServiceRegistry().getPermissionService().hasPermission(nodeRef, PermissionService.DELETE);
|
||||
if (AccessStatus.ALLOWED != perm)
|
||||
{
|
||||
throw new CmisPermissionDeniedException("Cannot delete the node version.");
|
||||
}
|
||||
@@ -1811,7 +1812,8 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
|
||||
}
|
||||
else
|
||||
{
|
||||
if (connector.getServiceRegistry().getPermissionService().hasPermission(nodeRef, PermissionService.DELETE) != AccessStatus.ALLOWED)
|
||||
AccessStatus perm = connector.getServiceRegistry().getPermissionService().hasPermission(nodeRef, PermissionService.DELETE);
|
||||
if (AccessStatus.ALLOWED != perm)
|
||||
{
|
||||
throw new CmisPermissionDeniedException("Cannot delete the node version.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user