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:
Jan Vonka
2007-08-30 15:59:07 +00:00
parent 7c238af116
commit 4c657db443
9 changed files with 848 additions and 719 deletions

View File

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