mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged BRANCHES/V2.3 to RM HEAD:
103080: Fixed merge issue git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103087 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,10 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.module.org_alfresco_module_rm.jscript.app;
|
package org.alfresco.module.org_alfresco_module_rm.jscript.app;
|
||||||
|
|
||||||
import static org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel.READ_RECORDS;
|
|
||||||
import static org.alfresco.repo.security.authentication.AuthenticationUtil.runAsSystem;
|
|
||||||
import static org.alfresco.service.cmr.security.AccessStatus.ALLOWED;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -395,23 +391,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
rmNodeValues.put("primaryParentNodeRef", assoc.getParentRef().toString());
|
rmNodeValues.put("primaryParentNodeRef", assoc.getParentRef().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// File plan node reference
|
|
||||||
NodeRef filePlan = getFilePlan(nodeRef);
|
|
||||||
if (permissionService.hasPermission(filePlan, READ_RECORDS).equals(ALLOWED))
|
|
||||||
{
|
|
||||||
rmNodeValues.put("filePlan", filePlan.toString());
|
|
||||||
|
|
||||||
// Unfiled container node reference
|
|
||||||
NodeRef unfiledRecordContainer = filePlanService.getUnfiledContainer(filePlan);
|
|
||||||
if (unfiledRecordContainer != null)
|
|
||||||
{
|
|
||||||
rmNodeValues.put("unfiledRecordContainer", unfiledRecordContainer.toString());
|
|
||||||
rmNodeValues.put("properties", propertiesToJSON(unfiledRecordContainer, nodeService.getProperties(unfiledRecordContainer), useShortQName));
|
|
||||||
QName type = fileFolderService.getFileInfo(unfiledRecordContainer).getType();
|
|
||||||
rmNodeValues.put("type", useShortQName ? type.toPrefixString(namespaceService) : type.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, Object> values = AuthenticationUtil.runAsSystem(new RunAsWork<Map<String, Object>>()
|
Map<String, Object> values = AuthenticationUtil.runAsSystem(new RunAsWork<Map<String, Object>>()
|
||||||
{
|
{
|
||||||
public Map<String, Object> doWork() throws Exception
|
public Map<String, Object> doWork() throws Exception
|
||||||
@@ -447,23 +426,6 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
return rmNodeValues;
|
return rmNodeValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper method to get the file plan as a system user for the given node
|
|
||||||
*
|
|
||||||
* @param nodeRef The node reference
|
|
||||||
* @return The file plan where the node is in
|
|
||||||
*/
|
|
||||||
private NodeRef getFilePlan(final NodeRef nodeRef)
|
|
||||||
{
|
|
||||||
return runAsSystem(new RunAsWork<NodeRef>()
|
|
||||||
{
|
|
||||||
public NodeRef doWork()
|
|
||||||
{
|
|
||||||
return filePlanService.getFilePlan(nodeRef);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private void setIndicators(JSONObject rmNodeValues, NodeRef nodeRef)
|
private void setIndicators(JSONObject rmNodeValues, NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user