diff --git a/rm-server/config/alfresco/module/org_alfresco_module_rm/alfresco-global.properties b/rm-server/config/alfresco/module/org_alfresco_module_rm/alfresco-global.properties index e7a6836cb4..c7cc3567fb 100644 --- a/rm-server/config/alfresco/module/org_alfresco_module_rm/alfresco-global.properties +++ b/rm-server/config/alfresco/module/org_alfresco_module_rm/alfresco-global.properties @@ -28,6 +28,8 @@ cache.writersSharedCache.maxItems=10000 # bootstrap.rmadmin.name=rmadmin bootstrap.rmadmin.pwd=rmadmin +bootstrap.rmadmin.firstName=Records Management +bootstrap.rmadmin.lastName=Administrator # # Indicates whether RM rules will be run as RM Admin or not by default diff --git a/rm-server/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml b/rm-server/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml index 6b2dd2c1d7..cf4d271e27 100644 --- a/rm-server/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml +++ b/rm-server/config/alfresco/module/org_alfresco_module_rm/rm-service-context.xml @@ -1188,6 +1188,8 @@ + + diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/patch/RMv2RMAdminUserPatch.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/patch/RMv2RMAdminUserPatch.java index fee1762f86..294d5f8352 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/patch/RMv2RMAdminUserPatch.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/patch/RMv2RMAdminUserPatch.java @@ -124,6 +124,9 @@ public class RMv2RMAdminUserPatch extends ModulePatchComponent implements BeanNa } String user = filePlanAuthenticationService.getRmAdminUserName(); + String firstName = filePlanAuthenticationService.getRmAdminFirstName(); + String lastName = filePlanAuthenticationService.getRmAdminLastName(); + if (authenticationService.authenticationExists(user) == false) { if (logger.isDebugEnabled() == true) @@ -134,6 +137,8 @@ public class RMv2RMAdminUserPatch extends ModulePatchComponent implements BeanNa authenticationService.createAuthentication(user, password.toCharArray()); Map properties = new HashMap(); properties.put(ContentModel.PROP_USERNAME, user); + properties.put(ContentModel.PROP_FIRSTNAME, firstName); + properties.put(ContentModel.PROP_LASTNAME, lastName); personService.createPerson(properties); if (logger.isDebugEnabled() == true) @@ -152,6 +157,5 @@ public class RMv2RMAdminUserPatch extends ModulePatchComponent implements BeanNa logger.debug(" ... RMv2RMAdminUserPatch complete"); } } - } } diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanAuthenticationService.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanAuthenticationService.java index 6158697e04..b3035b9d0a 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanAuthenticationService.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanAuthenticationService.java @@ -33,6 +33,16 @@ public interface FilePlanAuthenticationService */ String getRmAdminUserName(); + /** + * @return rm admin first name + */ + String getRmAdminFirstName(); + + /** + * @return rm admin last name + */ + String getRmAdminLastName(); + /** * Run provided work as the global rm admin user. * diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanAuthenticationServiceImpl.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanAuthenticationServiceImpl.java index 474b1b6280..dbc485069a 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanAuthenticationServiceImpl.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/security/FilePlanAuthenticationServiceImpl.java @@ -30,9 +30,13 @@ public class FilePlanAuthenticationServiceImpl implements FilePlanAuthentication /** Default rm admin user values */ public static final String DEFAULT_RM_ADMIN_USER = "rmadmin"; public static final String DEFAULT_RM_ADMIN_PWD = "rmadmin"; + public static final String DEFAULT_RM_ADMIN_FIRST_NAME = "Records Management"; + public static final String DEFAULT_RM_ADMIN_LAST_NAME = "Administrator"; private String rmAdminUserName = DEFAULT_RM_ADMIN_USER; - + private String rmAdminFirstName = DEFAULT_RM_ADMIN_FIRST_NAME; + private String rmAdminLastName = DEFAULT_RM_ADMIN_LAST_NAME; + /** * @param rmAdminUserName rm admin user name */ @@ -50,6 +54,40 @@ public class FilePlanAuthenticationServiceImpl implements FilePlanAuthentication return rmAdminUserName; } + /** + * @param rmAdminFirstName rm admin first name + */ + public void setRmAdminFirstName(String rmAdminFirstName) + { + this.rmAdminFirstName = rmAdminFirstName; + } + + /** + * @see org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationService#getRMAdminFirstName() + */ + @Override + public String getRmAdminFirstName() + { + return rmAdminFirstName; + } + + /** + * @param rmAdminLastName rm admin last name + */ + public void setRmAdminLastName(String rmAdminLastName) + { + this.rmAdminLastName = rmAdminLastName; + } + + /** + * @see org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationService#getRMAdminLastName() + */ + @Override + public String getRmAdminLastName() + { + return rmAdminLastName; + } + /** * @see org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationService#runAsRMAdmin(org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork) */