RM-183: All Language Packs: translation errors - Records Management site

* role groups wheren't being created with the resolved display label
 * I18N'ed the name of the 'all roles' group



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@55870 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-09-24 05:03:57 +00:00
parent 66a22b96af
commit 6d9e315802
2 changed files with 17 additions and 4 deletions

View File

@@ -10,4 +10,5 @@ rm.role.user=Records Management User
rm.role.powerUser=Records Management Power User rm.role.powerUser=Records Management Power User
rm.role.securityOfficer=Records Management Security Officer rm.role.securityOfficer=Records Management Security Officer
rm.role.recordsManager=Records Management Records Manager rm.role.recordsManager=Records Management Records Manager
rm.role.administrator=Records Management Administrator rm.role.administrator=Records Management Administrator
rm.role.all=All Records Management Roles

View File

@@ -79,6 +79,10 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
/** I18N */ /** I18N */
private static final String MSG_FIRST_NAME = "bootstrap.rmadmin.firstName"; private static final String MSG_FIRST_NAME = "bootstrap.rmadmin.firstName";
private static final String MSG_LAST_NAME = "bootstrap.rmadmin.lastName"; private static final String MSG_LAST_NAME = "bootstrap.rmadmin.lastName";
private static final String MSG_ALL_ROLES = "rm.role.all";
/** Location of bootstrap role JSON */
private static final String BOOTSTRAP_ROLE_JSON_LOCATION = "alfresco/module/org_alfresco_module_rm/security/rm-default-roles-bootstrap.json";
/** Capability service */ /** Capability service */
private CapabilityService capabilityService; private CapabilityService capabilityService;
@@ -249,7 +253,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
String allRoles = authorityService.createAuthority( String allRoles = authorityService.createAuthority(
AuthorityType.GROUP, AuthorityType.GROUP,
getAllRolesGroupShortName(rmRootNode), getAllRolesGroupShortName(rmRootNode),
"All Roles", I18NUtil.getMessage(MSG_ALL_ROLES),
new HashSet<String>(Arrays.asList(RMAuthority.ZONE_APP_RM))); new HashSet<String>(Arrays.asList(RMAuthority.ZONE_APP_RM)));
// Set the permissions // Set the permissions
@@ -332,7 +336,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
try try
{ {
// Load up the default roles from JSON // Load up the default roles from JSON
InputStream is = getClass().getClassLoader().getResourceAsStream("alfresco/module/org_alfresco_module_rm/security/rm-default-roles-bootstrap.json"); InputStream is = getClass().getClassLoader().getResourceAsStream(BOOTSTRAP_ROLE_JSON_LOCATION);
if (is == null) if (is == null)
{ {
throw new AlfrescoRuntimeException("Could not load default bootstrap roles configuration"); throw new AlfrescoRuntimeException("Could not load default bootstrap roles configuration");
@@ -725,7 +729,15 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
Set<String> zones = new HashSet<String>(2); Set<String> zones = new HashSet<String>(2);
zones.add(getZoneName(rmRootNode)); zones.add(getZoneName(rmRootNode));
zones.add(RMAuthority.ZONE_APP_RM); zones.add(RMAuthority.ZONE_APP_RM);
String roleGroup = authorityService.createAuthority(AuthorityType.GROUP, fullRoleName, roleDisplayLabel, zones);
// Look up string, default to passed value if none found
String groupDisplayLabel = I18NUtil.getMessage(roleDisplayLabel);
if (groupDisplayLabel == null)
{
groupDisplayLabel = roleDisplayLabel;
}
String roleGroup = authorityService.createAuthority(AuthorityType.GROUP, fullRoleName, groupDisplayLabel, zones);
// Add the roleGroup to the "all" role group // Add the roleGroup to the "all" role group
String allRoleGroup = authorityService.getName(AuthorityType.GROUP, getAllRolesGroupShortName(rmRootNode)); String allRoleGroup = authorityService.getName(AuthorityType.GROUP, getAllRolesGroupShortName(rmRootNode));