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:
Derek Hulley
2006-12-19 16:01:52 +00:00
parent b596814861
commit c4e8e02cf8
3 changed files with 13 additions and 4 deletions

View File

@@ -76,8 +76,8 @@
<!-- add config files to WEB-INF/classes -->
<copy todir="${dir.assemble}/WEB-INF/classes">
<fileset dir="${dir.config.repository}" excludes="**/*.sample" />
<fileset dir="${dir.config.webclient}" excludes="**/*.sample" />
<fileset dir="${dir.config.repository}" excludes="**/extension/**" />
<fileset dir="${dir.config.webclient}" excludes="**/extension/**" />
</copy>
<!-- clean up previously generated properties files -->

View File

@@ -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;
}
}
}

View File

@@ -75,7 +75,7 @@
<div class="mainSubText">
<h:outputText value="#{msg.location}" />: <r:nodePath value="#{DocumentDetailsBean.document.nodeRef}" breadcrumb="true" actionListener="#{BrowseBean.clickSpacePath}" />
</div>
<a:panel id="working-copy" rendered="#{DocumentDetailsBean.locked}">
<a:panel id="working-copy" rendered="#{DocumentDetailsBean.locked && DocumentDetailsBean.workingCopyDocument != null}">
<div class="mainSubText">
<h:outputText id="out-workingcopy" value="#{msg.working_copy_document}" />:
<a:actionLink id="act-details" rendered="#{DocumentDetailsBean.workingCopyDocument != null}" value="#{DocumentDetailsBean.workingCopyDocument.properties.name}" actionListener="#{BrowseBean.setupContentAction}" action="showDocDetails">