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)
130261 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1) 129999 ahind: Merged 5.2.N-AHIND (5.2.1) to searchapi (5.2.1) 129643 amorarasu: REPO-164 / REPO-1086 - V1 REST API: Lock Node git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130344 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1333,7 +1333,7 @@ public class NodesImpl implements Nodes
|
||||
Set<QName> assocTypeQNames = buildAssocTypes(assocTypeQNameParam);
|
||||
|
||||
// call GetChildrenCannedQuery (via FileFolderService)
|
||||
if (((filterProps == null) || (filterProps.size() == 0)) &&
|
||||
if (((filterProps == null) || (filterProps.size() == 0)) &&
|
||||
((assocTypeQNames == null) || (assocTypeQNames.size() == 0)) &&
|
||||
(smartStore.isVirtual(parentNodeRef)|| (smartStore.canVirtualize(parentNodeRef))))
|
||||
{
|
||||
@@ -1996,11 +1996,11 @@ public class NodesImpl implements Nodes
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private boolean isLocked(NodeRef nodeRef, Set<QName> aspects)
|
||||
{
|
||||
boolean locked = false;
|
||||
if (((aspects != null) && aspects.contains(ContentModel.ASPECT_LOCKABLE))
|
||||
if (((aspects != null) && aspects.contains(ContentModel.ASPECT_LOCKABLE))
|
||||
|| nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCKABLE))
|
||||
{
|
||||
locked = lockService.isLocked(nodeRef);
|
||||
@@ -2970,10 +2970,10 @@ public class NodesImpl implements Nodes
|
||||
|
||||
lockInfo = validateLockInformation(lockInfo);
|
||||
lockService.lock(nodeRef, lockInfo.getMappedType(), lockInfo.getTimeToExpire(), lockInfo.getLifetime());
|
||||
|
||||
|
||||
return getFolderOrDocument(nodeId, parameters);
|
||||
}
|
||||
|
||||
|
||||
private LockInfo validateLockInformation(LockInfo lockInfo)
|
||||
{
|
||||
// Set default values for the lock details.
|
||||
@@ -3001,7 +3001,7 @@ public class NodesImpl implements Nodes
|
||||
{
|
||||
throw new PermissionDeniedException("Current user doesn't have permission to unlock node " + nodeId);
|
||||
}
|
||||
|
||||
|
||||
lockService.unlock(nodeRef);
|
||||
return getFolderOrDocument(nodeId, parameters);
|
||||
}
|
||||
|
Reference in New Issue
Block a user