diff --git a/pandora/config.indiancinema.jsonc b/pandora/config.indiancinema.jsonc index 114dcfb2c..11e7eb035 100644 --- a/pandora/config.indiancinema.jsonc +++ b/pandora/config.indiancinema.jsonc @@ -73,13 +73,14 @@ "canSeeAccessed": {"researcher": true, "staff": true, "admin": true}, "canSeeAllTasks": {"staff": true, "admin": true}, "canSeeDebugMenu": {"researcher": true, "staff": true, "admin": true}, - "canSeeExtraItemViews": {"researcher": true, "staff": true, "admin": true}, - "canSeeMedia": {"researcher": true, "staff": true, "admin": true}, "canSeeDocument": {"guest": 1, "member": 1, "researcher": 2, "staff": 3, "admin": 3}, + "canSeeExtraItemViews": {"researcher": true, "staff": true, "admin": true}, "canSeeItem": {"guest": 2, "member": 2, "researcher": 2, "staff": 3, "admin": 3}, + "canSeeMedia": {"researcher": true, "staff": true, "admin": true}, "canSeeSize": {"researcher": true, "staff": true, "admin": true}, "canSeeSoftwareVersion": {"researcher": true, "staff": true, "admin": true}, - "canSendMail": {"staff": true, "admin": true} + "canSendMail": {"staff": true, "admin": true}, + "canShare": {"staff": true, "admin": true} }, /* "clipKeys" are the properties that clips can be sorted by (the values are diff --git a/pandora/config.padma.jsonc b/pandora/config.padma.jsonc index 6c425f6f9..64166bfe9 100644 --- a/pandora/config.padma.jsonc +++ b/pandora/config.padma.jsonc @@ -71,13 +71,14 @@ "canSeeAccessed": {"staff": true, "admin": true}, "canSeeAllTasks": {"staff": true, "admin": true}, "canSeeDebugMenu": {"staff": true, "admin": true}, - "canSeeExtraItemViews": {"staff": true, "admin": true}, - "canSeeMedia": {"staff": true, "admin": true}, "canSeeDocument": {"guest": 1, "member": 1, "staff": 4, "admin": 4}, + "canSeeExtraItemViews": {"staff": true, "admin": true}, "canSeeItem": {"guest": 1, "member": 1, "staff": 4, "admin": 4}, + "canSeeMedia": {"staff": true, "admin": true}, "canSeeSize": {"staff": true, "admin": true}, "canSeeSoftwareVersion": {"staff": true, "admin": true}, - "canSendMail": {"staff": true, "admin": true} + "canSendMail": {"staff": true, "admin": true}, + "canShare": {"staff": true, "admin": true} }, /* "clipKeys" are the properties that clips can be sorted by (the values are diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index 5ccd95e23..98e8f143c 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -1912,7 +1912,7 @@ pandora.ui.mainMenu = function() { ] }, {}, { id: 'embed', title: Ox._('Embed...') }, - { id: 'share', title: Ox._('Share...'), disabled: isGuest } + { id: 'share', title: Ox._('Share...'), disabled: !pandora.canShareView() } ]} } diff --git a/static/js/utils.js b/static/js/utils.js index ae57ce365..8f0286321 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -330,6 +330,12 @@ pandora.beforeUnloadWindow = function() { pandora.isUnloading = true; }; + +pandora.canShareView = function() { + return pandora.hasCapability('canShare') +}; + + pandora.changeFolderItemStatus = function(id, status, callback) { var ui = pandora.user.ui, folderItems = pandora.getFolderItems(ui.section),