mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge pull request #1270 from Alfresco/hotfix-3.2/MNT-22012_UnresponsiveFilePlanInLargeRepository
Remove fix for RM-6864 which causes performance issues
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
<property name="recordContributorsGroupName" value="${rm.record.contributors.group.name}"/>
|
||||
<property name="recordService" ref="RecordService"/>
|
||||
<property name="filePlanService" ref="FilePlanService"/>
|
||||
<property name="filePlanRoleService" ref="FilePlanRoleService" />
|
||||
<property name="capabilityService" ref="CapabilityService"/>
|
||||
<property name="dictionaryService" ref="DictionaryService" />
|
||||
<property name="siteService" ref="SiteService" />
|
||||
|
@@ -36,7 +36,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
|
||||
@@ -48,8 +47,6 @@ import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.role.Role;
|
||||
import org.alfresco.repo.cache.SimpleCache;
|
||||
import org.alfresco.repo.node.NodeServicePolicies;
|
||||
import org.alfresco.repo.policy.JavaBehaviour;
|
||||
@@ -66,7 +63,6 @@ import org.alfresco.service.cmr.site.SiteService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.PathUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
@@ -86,7 +82,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
||||
private static final String IS_RM_SITE_CREATED = "isRmSiteCreated";
|
||||
private static final String IS_RECORD_CONTRIBUTOR_GROUP_ENABLED = "isRecordContributorGroupEnabled";
|
||||
private static final String RECORD_CONTRIBUTOR_GROUP_NAME = "recordContributorGroupName";
|
||||
private static final String IS_VISIBLE_FOR_CURRENT_USER = "isVisibleForCurrentUser";
|
||||
private static final String FROZEN_ACTIVE_CONTENT = "frozencontent";
|
||||
|
||||
/** true if record contributor group is enabled, false otherwise */
|
||||
@@ -101,9 +96,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
||||
/** File plan service */
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/** File plan role service */
|
||||
private FilePlanRoleService filePlanRoleService;
|
||||
|
||||
/** Capability service */
|
||||
private CapabilityService capabilityService;
|
||||
|
||||
@@ -168,14 +160,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
||||
this.filePlanService = filePlanService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanRoleService file plan role service
|
||||
*/
|
||||
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
|
||||
{
|
||||
this.filePlanRoleService = filePlanRoleService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param capabilityService capability service
|
||||
*/
|
||||
@@ -329,17 +313,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
||||
addInfo(nodeInfo, rootJSONObject);
|
||||
}
|
||||
}
|
||||
Set<NodeRef> filePlans = filePlanService.getFilePlans();
|
||||
if (!CollectionUtils.isEmpty(filePlans))
|
||||
{
|
||||
NodeRef filePlanNodeRef = filePlans.stream().findFirst().orElse(null);
|
||||
if (filePlanNodeRef != null)
|
||||
{
|
||||
Set<Role> roles = filePlanRoleService.getRolesByUser(filePlanNodeRef, AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
boolean hasFilingPermission = !CollectionUtils.isEmpty(roles);
|
||||
rootJSONObject.put(IS_VISIBLE_FOR_CURRENT_USER, hasFilingPermission);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user