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:
@@ -28,6 +28,8 @@ cache.writersSharedCache.maxItems=10000
|
|||||||
#
|
#
|
||||||
bootstrap.rmadmin.name=rmadmin
|
bootstrap.rmadmin.name=rmadmin
|
||||||
bootstrap.rmadmin.pwd=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
|
# Indicates whether RM rules will be run as RM Admin or not by default
|
||||||
|
@@ -1188,6 +1188,8 @@
|
|||||||
<bean id="filePlanAuthenticationService"
|
<bean id="filePlanAuthenticationService"
|
||||||
class="org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationServiceImpl">
|
class="org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationServiceImpl">
|
||||||
<property name="rmAdminUserName" value="${bootstrap.rmadmin.name}" />
|
<property name="rmAdminUserName" value="${bootstrap.rmadmin.name}" />
|
||||||
|
<property name="rmAdminFirstName" value="${bootstrap.rmadmin.firstName}" />
|
||||||
|
<property name="rmAdminLastName" value="${bootstrap.rmadmin.lastName}" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="FilePlanAuthenticationService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="FilePlanAuthenticationService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
|
@@ -124,6 +124,9 @@ public class RMv2RMAdminUserPatch extends ModulePatchComponent implements BeanNa
|
|||||||
}
|
}
|
||||||
|
|
||||||
String user = filePlanAuthenticationService.getRmAdminUserName();
|
String user = filePlanAuthenticationService.getRmAdminUserName();
|
||||||
|
String firstName = filePlanAuthenticationService.getRmAdminFirstName();
|
||||||
|
String lastName = filePlanAuthenticationService.getRmAdminLastName();
|
||||||
|
|
||||||
if (authenticationService.authenticationExists(user) == false)
|
if (authenticationService.authenticationExists(user) == false)
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled() == true)
|
if (logger.isDebugEnabled() == true)
|
||||||
@@ -134,6 +137,8 @@ public class RMv2RMAdminUserPatch extends ModulePatchComponent implements BeanNa
|
|||||||
authenticationService.createAuthentication(user, password.toCharArray());
|
authenticationService.createAuthentication(user, password.toCharArray());
|
||||||
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
|
||||||
properties.put(ContentModel.PROP_USERNAME, user);
|
properties.put(ContentModel.PROP_USERNAME, user);
|
||||||
|
properties.put(ContentModel.PROP_FIRSTNAME, firstName);
|
||||||
|
properties.put(ContentModel.PROP_LASTNAME, lastName);
|
||||||
personService.createPerson(properties);
|
personService.createPerson(properties);
|
||||||
|
|
||||||
if (logger.isDebugEnabled() == true)
|
if (logger.isDebugEnabled() == true)
|
||||||
@@ -152,6 +157,5 @@ public class RMv2RMAdminUserPatch extends ModulePatchComponent implements BeanNa
|
|||||||
logger.debug(" ... RMv2RMAdminUserPatch complete");
|
logger.debug(" ... RMv2RMAdminUserPatch complete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,16 @@ public interface FilePlanAuthenticationService
|
|||||||
*/
|
*/
|
||||||
String getRmAdminUserName();
|
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.
|
* Run provided work as the global rm admin user.
|
||||||
*
|
*
|
||||||
|
@@ -30,9 +30,13 @@ public class FilePlanAuthenticationServiceImpl implements FilePlanAuthentication
|
|||||||
/** Default rm admin user values */
|
/** Default rm admin user values */
|
||||||
public static final String DEFAULT_RM_ADMIN_USER = "rmadmin";
|
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_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 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
|
* @param rmAdminUserName rm admin user name
|
||||||
*/
|
*/
|
||||||
@@ -50,6 +54,40 @@ public class FilePlanAuthenticationServiceImpl implements FilePlanAuthentication
|
|||||||
return rmAdminUserName;
|
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)
|
* @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