RM-1429 (The user with read-only permissions on the item can unfreeze it via deleting hold)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@72349 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-05-30 14:13:28 +00:00
parent 9be3e71543
commit 2fd27133e1
2 changed files with 39 additions and 3 deletions

View File

@@ -418,12 +418,11 @@ public class HoldServiceImpl extends ServiceBaseImpl
throw new AlfrescoRuntimeException("Can't delete hold, becuase passed node is not a hold. (hold=" + hold.toString() + ")");
}
/*
List<NodeRef> held = getHeld(hold);
List<String> heldNames = new ArrayList<String>();
for (NodeRef nodeRef : held)
{
if (permissionService.hasPermission(hold, RMPermissionModel.FILING) == AccessStatus.ALLOWED)
if (permissionService.hasPermission(nodeRef, RMPermissionModel.FILING) == AccessStatus.DENIED)
{
heldNames.add((String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME));
}
@@ -435,11 +434,12 @@ public class HoldServiceImpl extends ServiceBaseImpl
for (String name : heldNames)
{
sb.append("\n ");
sb.append("'");
sb.append(name);
sb.append("'");
}
throw new AlfrescoRuntimeException("Can't delete hold, because filing permissions for the following items are needed: " + sb.toString());
}
*/
// delete the hold node
nodeService.deleteNode(hold);