From acd4fe1e7bc1f8f5544deeb95620640ff43f1008 Mon Sep 17 00:00:00 2001 From: Tuna Aksoy Date: Sun, 15 Jun 2014 20:32:21 +0000 Subject: [PATCH] RM-1539 (File Plan root categories are displayed in Active Holds for user with no permissions to Hold container) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@73866 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../documentlibrary-v2/rm-parse-args.lib.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/rm-server/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/rm-parse-args.lib.js b/rm-server/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/rm-parse-args.lib.js index d74964571a..8dc31d37c1 100644 --- a/rm-server/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/rm-parse-args.lib.js +++ b/rm-server/config/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/rm-parse-args.lib.js @@ -88,18 +88,27 @@ ParseArgs.getParsedArgs = function RecordsManagementFilter_getParsedArgs(contain if (args.filter == "unfiledRecords") { - var unfiledRecordContainer = rootNode.childrenByXPath("rma:Unfiled_x0020_Records"); - pathNode = unfiledRecordContainer.length > 0 ? unfiledRecordContainer[0] : rootNode; + var container = rootNode.childrenByXPath("rma:Unfiled_x0020_Records"); + if (container.length > 0) + { + pathNode = container[0]; + } } else if (args.filter == "holds") { var container = rootNode.childrenByXPath("rma:Holds"); - pathNode = container.length > 0 ? container[0] : rootNode; + if (container.length > 0) + { + pathNode = container[0]; + } } else if (args.filter == "transfers") { var container = rootNode.childrenByXPath("rma:Transfers"); - pathNode = container.length > 0 ? container[0] : rootNode; + if (container.length > 0) + { + pathNode = container[0]; + } } else {