mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Tenant Services hooks for WebClient - for getting tenant-specific company home/root space [not guest*servlets yet]
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6645 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -574,10 +574,11 @@ public class NavigationBean
|
||||
}
|
||||
catch (InvalidNodeRefException refErr)
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
|
||||
FacesContext.getCurrentInstance(), ERROR_DELETED_FOLDER), new Object[] {this.currentNodeId}) );
|
||||
fc, ERROR_DELETED_FOLDER), new Object[] {this.currentNodeId}) );
|
||||
|
||||
nodeRef = new NodeRef(Repository.getStoreRef(), Application.getCompanyRootId());
|
||||
nodeRef = new NodeRef(Repository.getStoreRef(), Application.getCompanyRootId(fc));
|
||||
node = new Node(nodeRef);
|
||||
props = node.getProperties();
|
||||
}
|
||||
@@ -679,8 +680,13 @@ public class NavigationBean
|
||||
{
|
||||
if (this.companyHomeNode == null)
|
||||
{
|
||||
NodeRef companyRootRef = new NodeRef(Repository.getStoreRef(), Application.getCompanyRootId());
|
||||
this.companyHomeNode = new Node(companyRootRef);
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
String companyRootId = Application.getCompanyRootId(fc);
|
||||
if (companyRootId != null)
|
||||
{
|
||||
NodeRef companyRootRef = new NodeRef(Repository.getStoreRef(), companyRootId);
|
||||
this.companyHomeNode = new Node(companyRootRef);
|
||||
}
|
||||
}
|
||||
return this.companyHomeNode;
|
||||
}
|
||||
@@ -721,7 +727,15 @@ public class NavigationBean
|
||||
*/
|
||||
public boolean getCompanyHomeVisible()
|
||||
{
|
||||
return getCompanyHomeNode().hasPermission(PermissionService.READ);
|
||||
Node companyHomeNode = getCompanyHomeNode();
|
||||
if (companyHomeNode != null)
|
||||
{
|
||||
return companyHomeNode.hasPermission(PermissionService.READ);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user