. Single web-app per Web Project changes implemented in Sandbox browsing view

- the web-app folder name specified at Web Project creation time is created by default and is the root folder for all sandbox operations
 - a mechanism for selecting a different root webapp (or creating new root folders) can be easily added later (when there is time…!)
. Removal of two public workflow actions that have no params and therefore don't work as public actions in the UI
. Fix to user sandboxes component to allow any user to always have action to delete a user sandbox

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4445 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-11-27 12:07:36 +00:00
parent 0f6efbd751
commit 3fb9505fe0
8 changed files with 85 additions and 64 deletions

View File

@@ -511,7 +511,8 @@ public class AVMBrowseBean implements IContextListener
{
if (this.currentPath == null)
{
this.currentPath = AVMConstants.buildAVMStoreRootPath(getSandbox());
String webapp = (String)getWebsite().getProperties().get(ContentModel.PROP_DEFAULTWEBAPP);
this.currentPath = AVMConstants.buildAVMStoreWebappPath(getSandbox(), webapp);
}
return this.currentPath;
}
@@ -532,40 +533,6 @@ public class AVMBrowseBean implements IContextListener
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
}
/**
* @return true if the current user has the manager role in the current website
*/
public boolean getIsManagerRole()
{
boolean isManager = false;
User user = Application.getCurrentUser(FacesContext.getCurrentInstance());
if (user.isAdmin() == false)
{
String currentUser = user.getUserName();
Node websiteNode = this.navigator.getCurrentNode();
List<ChildAssociationRef> userInfoRefs = this.nodeService.getChildAssocs(
websiteNode.getNodeRef(), ContentModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef ref : userInfoRefs)
{
NodeRef userInfoRef = ref.getChildRef();
String username = (String)nodeService.getProperty(userInfoRef, ContentModel.PROP_WEBUSERNAME);
String userrole = (String)nodeService.getProperty(userInfoRef, ContentModel.PROP_WEBUSERROLE);
if (currentUser.equals(username) && ROLE_CONTENT_MANAGER.equals(userrole))
{
isManager = true;
break;
}
}
}
else
{
isManager = true;
}
return isManager;
}
/**
* @return the AVMNode that represents the current browsing path
*/
@@ -602,6 +569,40 @@ public class AVMBrowseBean implements IContextListener
this.location = location;
}
/**
* @return true if the current user has the manager role in the current website
*/
public boolean getIsManagerRole()
{
boolean isManager = false;
User user = Application.getCurrentUser(FacesContext.getCurrentInstance());
if (user.isAdmin() == false)
{
String currentUser = user.getUserName();
Node websiteNode = this.navigator.getCurrentNode();
List<ChildAssociationRef> userInfoRefs = this.nodeService.getChildAssocs(
websiteNode.getNodeRef(), ContentModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef ref : userInfoRefs)
{
NodeRef userInfoRef = ref.getChildRef();
String username = (String)nodeService.getProperty(userInfoRef, ContentModel.PROP_WEBUSERNAME);
String userrole = (String)nodeService.getProperty(userInfoRef, ContentModel.PROP_WEBUSERROLE);
if (currentUser.equals(username) && ROLE_CONTENT_MANAGER.equals(userrole))
{
isManager = true;
break;
}
}
}
else
{
isManager = true;
}
return isManager;
}
/**
* @return Map of avm node objects representing the folders with the current website space
*/