mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-771 rmadmin user has no first or last name set
* The change includes modifying RMv2RMAdminUserPatch.java to include the default first name and last name on RM admin user creation. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@53483 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -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.
|
||||
*
|
||||
|
@@ -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)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user