mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-690 (A records admin is able to add a user or group to a role from the management console)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@50134 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
}<#if group_has_next>,</#if>
|
||||
</#list>
|
||||
]
|
||||
<#if role.groupShortName??>
|
||||
,"groupShortName": "${role.groupShortName}"
|
||||
</#if>
|
||||
</#if>
|
||||
}
|
||||
</#escape>
|
||||
|
@@ -441,10 +441,12 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
|
||||
Set<String> users = authorityService.getContainedAuthorities(AuthorityType.USER, roleAuthority, false);
|
||||
if (users.contains(user) == true)
|
||||
{
|
||||
String name = getShortRoleName(authorityService.getShortName(roleAuthority), rmRootNode);
|
||||
String groupShortName = authorityService.getShortName(roleAuthority);
|
||||
String name = getShortRoleName(groupShortName, rmRootNode);
|
||||
String displayLabel = authorityService.getAuthorityDisplayName(roleAuthority);
|
||||
Set<Capability> capabilities = getCapabilitiesImpl(rmRootNode, roleAuthority);
|
||||
|
||||
Role role = new Role(name, displayLabel, getCapabilitiesImpl(rmRootNode, roleAuthority), roleAuthority);
|
||||
Role role = new Role(name, displayLabel, capabilities, roleAuthority, groupShortName);
|
||||
result.add(role);
|
||||
}
|
||||
}
|
||||
|
@@ -41,10 +41,14 @@ public class Role
|
||||
/** Role group name */
|
||||
private String roleGroupName;
|
||||
|
||||
/** Role group short name */
|
||||
private String groupShortName;
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @param displayLabel
|
||||
* @param capabilities
|
||||
* @param roleGroupName
|
||||
*/
|
||||
public Role(String name, String displayLabel, Set<Capability> capabilities, String roleGroupName)
|
||||
{
|
||||
@@ -54,6 +58,19 @@ public class Role
|
||||
this.roleGroupName = roleGroupName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @param displayLabel
|
||||
* @param capabilities
|
||||
* @param roleGroupName
|
||||
* @param groupShortName
|
||||
*/
|
||||
public Role(String name, String displayLabel, Set<Capability> capabilities, String roleGroupName, String groupShortName)
|
||||
{
|
||||
this(name, displayLabel, capabilities, roleGroupName);
|
||||
this.groupShortName = groupShortName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
@@ -85,4 +102,13 @@ public class Role
|
||||
{
|
||||
return roleGroupName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the groupShortName
|
||||
*/
|
||||
public String getGroupShortName()
|
||||
{
|
||||
return this.groupShortName;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -188,6 +188,7 @@ public class RoleDeclarativeWebScript extends DeclarativeWebScript
|
||||
public class RoleItem
|
||||
{
|
||||
private String name;
|
||||
private String groupShortName;
|
||||
private String displayLabel;
|
||||
private Set<Capability> capabilities;
|
||||
private boolean showAuths = false;
|
||||
@@ -204,6 +205,7 @@ public class RoleDeclarativeWebScript extends DeclarativeWebScript
|
||||
public RoleItem(Role role, Set<AuthorityItem> assignedUsers, Set<AuthorityItem> assignedGroups)
|
||||
{
|
||||
this.name = role.getName();
|
||||
this.groupShortName = role.getGroupShortName();
|
||||
this.displayLabel = role.getDisplayLabel();
|
||||
this.capabilities = role.getCapabilities();
|
||||
this.showAuths = true;
|
||||
@@ -216,6 +218,11 @@ public class RoleDeclarativeWebScript extends DeclarativeWebScript
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getGroupShortName()
|
||||
{
|
||||
return groupShortName;
|
||||
}
|
||||
|
||||
public String getDisplayLabel()
|
||||
{
|
||||
return displayLabel;
|
||||
|
Reference in New Issue
Block a user