[RM-900] MT: Impossible to create RM site as tenant. Add additional wrapper test for rm_config_node to stop re-execution of module bootstrap if it has already been run.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@54949 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jared Ottley
2013-09-04 21:41:04 +00:00
parent af2af21b79
commit d4f3fa4179

View File

@@ -107,6 +107,11 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
/** Records management role zone */
public static final String RM_ROLE_ZONE_PREFIX = "rmRoleZone";
/**
* Records Management Config Node
*/
private static final String CONFIG_NODEID = "rm_config_folder";
/** Logger */
private static Log logger = LogFactory.getLog(FilePlanRoleServiceImpl.class);
@@ -229,7 +234,11 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
public NodeRef doWork()
{
//In a multi tenant store we need to initialize the rm config if it has been done yet
bootstrapImporterModule.execute();
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID);
if (nodeService.exists(nodeRef) == false)
{
bootstrapImporterModule.execute();
}
// Create "all" role group for root node
String allRoles = authorityService.createAuthority(