mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
11509: ETHREEOH-394: Incorrect message in activity feed when user accepts an invitation to a site 11510: Fix to set position 11511: Fix for ETHREEOH-533: Dialogs access via ExternalAccessServlet return to blank empty container.jsp page when Close button is clicked 11512: Fix DM ACL deletion after merge forward for shared and defining ACLs. 11513: Merged V2.2 to V3.0 11501: Expose if set permissions are inherited or not and fix relatd behaviour for import/copy 11514: Fix for ETHREEOH-476 (Impossible to create Site Invite Workflow) & ETHREEOH-254 (Default value at 'Start Advanced Workflow Wizard' page) 11515: Fix for ETHREEOH-446 and ETHREEOH-447 11517: Fix for ETHREEOH-225: Web Forms with repeating elements don't work 11518: Merged V2.2 to V3.0 11343: ACL upgrades may require a COW - it now warns when this happens. 11369: Always lock against staging - ETWOTWO-763 11519: Merged V2.2 to V3.0 11467: Fixed ETWOTWO-774: CreateVersionTxnListener.afterCommit() throws NPE 11468: More defensive coding on AVM txn listeners (avoid NPEs) 11475: More defensive checks to avoid NPE 11520: Merged V2.2 to V3.0 11478: Keep creator and owner as orihinally set in AVM - Fix for ETWOTWO-604 11521: RuntimeExec: Added optional directive SPLIT: to force argument tokenization 11522: Limited tests to just check the command format not execute it for "dir . .." 11523: Undid revision 11520 (Merged V2.2 11478) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12449 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -60,18 +60,23 @@ import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.BrowseBean;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||
import org.alfresco.web.bean.dialog.FilterViewSupport;
|
||||
import org.alfresco.web.bean.repository.MapNode;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||
import org.alfresco.web.ui.common.component.UIListItem;
|
||||
import org.alfresco.web.ui.common.component.UIModeList;
|
||||
import org.alfresco.web.ui.common.component.data.UIRichList;
|
||||
import org.alfresco.web.ui.repo.WebResources;
|
||||
|
||||
/**
|
||||
* Bean backing the Manage Space/Content Permission pages.
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public abstract class UserMembersBean extends BaseDialogBean implements IContextListener
|
||||
public abstract class UserMembersBean extends BaseDialogBean implements IContextListener, FilterViewSupport
|
||||
{
|
||||
private static final String MSG_SUCCESS_INHERIT_NOT = "success_not_inherit_permissions";
|
||||
private static final String MSG_SUCCESS_INHERIT = "success_inherit_permissions";
|
||||
@@ -80,6 +85,13 @@ public abstract class UserMembersBean extends BaseDialogBean implements IContext
|
||||
|
||||
private static final String OUTCOME_FINISH = "finish";
|
||||
|
||||
private static final String LOCAL = "local";
|
||||
private static final String INHERITED = "inherited";
|
||||
|
||||
private final static String MSG_CLOSE = "close";
|
||||
|
||||
private String filterMode = LOCAL;
|
||||
|
||||
/** NodeService bean reference */
|
||||
transient private NodeService nodeService;
|
||||
|
||||
@@ -337,6 +349,8 @@ public abstract class UserMembersBean extends BaseDialogBean implements IContext
|
||||
{
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
|
||||
boolean includeInherited = (this.filterMode.equals(INHERITED));
|
||||
|
||||
List<Map> personNodes = null;
|
||||
|
||||
UserTransaction tx = null;
|
||||
@@ -359,17 +373,20 @@ public abstract class UserMembersBean extends BaseDialogBean implements IContext
|
||||
permission.getAuthorityType() == AuthorityType.GUEST ||
|
||||
permission.getAuthorityType() == AuthorityType.EVERYONE))
|
||||
{
|
||||
String authority = permission.getAuthority();
|
||||
|
||||
List<String> userPermissions = permissionMap.get(authority);
|
||||
if (userPermissions == null)
|
||||
if (includeInherited || permission.isSetDirectly())
|
||||
{
|
||||
// create for first time
|
||||
userPermissions = new ArrayList<String>(4);
|
||||
permissionMap.put(authority, userPermissions);
|
||||
String authority = permission.getAuthority();
|
||||
|
||||
List<String> userPermissions = permissionMap.get(authority);
|
||||
if (userPermissions == null)
|
||||
{
|
||||
// create for first time
|
||||
userPermissions = new ArrayList<String>(4);
|
||||
permissionMap.put(authority, userPermissions);
|
||||
}
|
||||
// add the permission name for this authority
|
||||
userPermissions.add(permission.getPermission());
|
||||
}
|
||||
// add the permission name for this authority
|
||||
userPermissions.add(permission.getPermission());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,6 +413,7 @@ public abstract class UserMembersBean extends BaseDialogBean implements IContext
|
||||
props.put("roles", roleListToString(context, permissionMap.get(authority)));
|
||||
props.put("icon", WebResources.IMAGE_PERSON);
|
||||
props.put("isGroup", Boolean.FALSE);
|
||||
props.put("inherited", includeInherited);
|
||||
|
||||
personNodes.add(node);
|
||||
}
|
||||
@@ -403,7 +421,7 @@ public abstract class UserMembersBean extends BaseDialogBean implements IContext
|
||||
else
|
||||
{
|
||||
// need a map (dummy node) to represent props for this Group Authority
|
||||
Map<String, Object> node = new HashMap<String, Object>(5, 1.0f);
|
||||
Map<String, Object> node = new HashMap<String, Object>(8, 1.0f);
|
||||
if (authority.startsWith(PermissionService.GROUP_PREFIX) == true)
|
||||
{
|
||||
node.put("fullName", authority.substring(PermissionService.GROUP_PREFIX.length()));
|
||||
@@ -417,6 +435,8 @@ public abstract class UserMembersBean extends BaseDialogBean implements IContext
|
||||
node.put("roles", roleListToString(context, permissionMap.get(authority)));
|
||||
node.put("icon", WebResources.IMAGE_GROUP);
|
||||
node.put("isGroup", Boolean.TRUE);
|
||||
node.put("inherited", includeInherited);
|
||||
|
||||
personNodes.add(node);
|
||||
}
|
||||
}
|
||||
@@ -501,6 +521,65 @@ public abstract class UserMembersBean extends BaseDialogBean implements IContext
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// FilterViewSupport implementation
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.bean.dialog.FilterViewSupport#filterModeChanged(javax.faces.event.ActionEvent)
|
||||
*/
|
||||
public void filterModeChanged(ActionEvent event)
|
||||
{
|
||||
UIModeList viewList = (UIModeList) event.getComponent();
|
||||
setFilterMode(viewList.getValue().toString());
|
||||
// force the list to be re-queried when the page is refreshed
|
||||
if (this.usersRichList != null)
|
||||
{
|
||||
this.usersRichList.setValue(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.bean.dialog.FilterViewSupport#getFilterItems()
|
||||
*/
|
||||
public List<UIListItem> getFilterItems()
|
||||
{
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
List<UIListItem> items = new ArrayList<UIListItem>(2);
|
||||
|
||||
UIListItem item1 = new UIListItem();
|
||||
item1.setValue(INHERITED);
|
||||
item1.setLabel(Application.getMessage(context, INHERITED));
|
||||
items.add(item1);
|
||||
|
||||
UIListItem item2 = new UIListItem();
|
||||
item2.setValue(LOCAL);
|
||||
item2.setLabel(Application.getMessage(context, LOCAL));
|
||||
items.add(item2);
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.bean.dialog.FilterViewSupport#getFilterMode()
|
||||
*/
|
||||
public String getFilterMode()
|
||||
{
|
||||
return filterMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.bean.dialog.FilterViewSupport#setFilterMode(java.lang.String)
|
||||
*/
|
||||
public void setFilterMode(final String filterMode)
|
||||
{
|
||||
this.filterMode = filterMode;
|
||||
|
||||
// clear datalist cache ready to change results based on filter setting
|
||||
contextUpdated();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Action event handlers
|
||||
|
||||
|
Reference in New Issue
Block a user