diff --git a/pandora/config.indiancinema.jsonc b/pandora/config.indiancinema.jsonc index 114dcfb2..11e7eb03 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 6c425f6f..64166bfe 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 5ccd95e2..98e8f143 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 ae57ce36..8f028632 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),