mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
129897 mmuller: Restrict lock method to content types. REPO-1158 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130239 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2963,6 +2963,11 @@ public class NodesImpl implements Nodes
|
||||
throw new PermissionDeniedException("Current user doesn't have permission to lock node " + nodeId);
|
||||
}
|
||||
|
||||
if (!nodeMatches(nodeRef, Collections.singleton(ContentModel.TYPE_CONTENT), null, false))
|
||||
{
|
||||
throw new InvalidArgumentException("NodeId of content is expected: " + nodeRef.getId());
|
||||
}
|
||||
|
||||
lockInfo = validateLockInformation(lockInfo);
|
||||
lockService.lock(nodeRef, lockInfo.getMappedType(), lockInfo.getTimeToExpire(), lockInfo.getLifetime());
|
||||
|
||||
|
Reference in New Issue
Block a user