From 4c4a27a629bbb812e1320818520ea266e220b7d8 Mon Sep 17 00:00:00 2001 From: krwong Date: Tue, 2 Jan 2024 15:09:57 -0500 Subject: [PATCH 1/2] only allow export member order for work objects --- static/js/admin/src/ResultObjectActionMenu.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/admin/src/ResultObjectActionMenu.js b/static/js/admin/src/ResultObjectActionMenu.js index f754cd60cc..251b087144 100644 --- a/static/js/admin/src/ResultObjectActionMenu.js +++ b/static/js/admin/src/ResultObjectActionMenu.js @@ -203,7 +203,9 @@ define('ResultObjectActionMenu', [ 'jquery', 'jquery-ui', 'StringUtilities', 'A items['export']['items']["exportCSV"] = {name: "Export CSV"}; } - items['export']['items']["exportMemberOrder"] = {name: "Export Member Order"}; + if (metadata.type === 'Work') { + items['export']['items']["exportMemberOrder"] = {name: "Export Member Order"}; + } } items["copyid"] = {name : 'Copy PID to Clipboard'}; From 0884b5eac204770c8d0c27d45f1d4285a178c106 Mon Sep 17 00:00:00 2001 From: krwong Date: Tue, 2 Jan 2024 15:23:15 -0500 Subject: [PATCH 2/2] remove export option from root --- static/js/admin/src/ResultObjectActionMenu.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/static/js/admin/src/ResultObjectActionMenu.js b/static/js/admin/src/ResultObjectActionMenu.js index 251b087144..0c30b5d19c 100644 --- a/static/js/admin/src/ResultObjectActionMenu.js +++ b/static/js/admin/src/ResultObjectActionMenu.js @@ -196,12 +196,10 @@ define('ResultObjectActionMenu', [ 'jquery', 'jquery-ui', 'StringUtilities', 'A } // Export actions - if (metadata.type !== 'File' && $.inArray('viewHidden', metadata.permissions) !== -1) { + if (!isContentRoot && metadata.type !== 'File' && $.inArray('viewHidden', metadata.permissions) !== -1) { items["export"] = {name: "Export", items: {}} - if (!isContentRoot) { - items['export']['items']["exportCSV"] = {name: "Export CSV"}; - } + items['export']['items']["exportCSV"] = {name: "Export CSV"}; if (metadata.type === 'Work') { items['export']['items']["exportMemberOrder"] = {name: "Export Member Order"};