mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4392 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4399 . svn resolved root\projects\repository\source\java\org\alfresco\repo\jscript\Node.java git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4660 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,6 +37,7 @@ import org.alfresco.service.cmr.lock.LockService;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.TemplateNode;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.cmr.version.Version;
|
||||
import org.alfresco.service.cmr.version.VersionHistory;
|
||||
import org.alfresco.service.cmr.version.VersionService;
|
||||
@@ -638,7 +639,8 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the working copy document Node for this document if found or null if not
|
||||
* @return the working copy document Node for this document if found and the
|
||||
* current has permission or null if not
|
||||
*/
|
||||
public Node getWorkingCopyDocument()
|
||||
{
|
||||
@@ -650,6 +652,13 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
if (workingCopyRef != null)
|
||||
{
|
||||
workingCopyNode = new Node(workingCopyRef);
|
||||
|
||||
// if the current user does not have read permission on
|
||||
// working copy return null
|
||||
if (workingCopyNode.hasPermission(PermissionService.READ) == false)
|
||||
{
|
||||
workingCopyNode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user