mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. 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:
@@ -50,6 +50,7 @@ import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.DownloadContentServlet;
|
||||
import org.alfresco.web.bean.BrowseBean;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
||||
import org.alfresco.web.bean.wcm.AVMNode;
|
||||
import org.alfresco.web.config.ClientConfigElement;
|
||||
@@ -426,19 +427,23 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
*/
|
||||
private static boolean isManagerRole(FacesContext context, NodeService nodeService, NodeRef websiteRef)
|
||||
{
|
||||
boolean isManager = false;
|
||||
String currentUser = Application.getCurrentUser(context).getUserName();
|
||||
List<ChildAssociationRef> userInfoRefs = nodeService.getChildAssocs(
|
||||
websiteRef, ContentModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
|
||||
for (ChildAssociationRef ref : userInfoRefs)
|
||||
User user = Application.getCurrentUser(context);
|
||||
boolean isManager = user.isAdmin();
|
||||
if (isManager == false)
|
||||
{
|
||||
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))
|
||||
String currentUser = user.getUserName();
|
||||
List<ChildAssociationRef> userInfoRefs = nodeService.getChildAssocs(
|
||||
websiteRef, ContentModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL);
|
||||
for (ChildAssociationRef ref : userInfoRefs)
|
||||
{
|
||||
isManager = true;
|
||||
break;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
return isManager;
|
||||
|
Reference in New Issue
Block a user