Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-08-26 12:09:18 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-08-26 21:04:06 +0300
commit5fb827d06292804c19bdf08eb15a7cb3dcd0d891 (patch)
tree4249917c36a1df9d973f681dd72cc03d468e1218 /apps/files_sharing/src
parent15416e73057aa8d56d6420fcebcc877f5e01be49 (diff)
Remove copy in file actions when not allowedbackport/33713/stable24
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r--apps/files_sharing/src/share.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/src/share.js b/apps/files_sharing/src/share.js
index 76c007b5218..93891cbf287 100644
--- a/apps/files_sharing/src/share.js
+++ b/apps/files_sharing/src/share.js
@@ -94,6 +94,10 @@ import { getCapabilities } from '@nextcloud/capabilities'
}
if (_.isFunction(fileData.canDownload) && !fileData.canDownload()) {
delete fileActions.actions.all.Download
+ if (fileData.permissions & OC.PERMISSION_UPDATE === 0) {
+ // neither move nor copy is allowed, remove the action completely
+ delete fileActions.actions.all.MoveCopy
+ }
}
tr.attr('data-share-permissions', sharePermissions)
tr.attr('data-share-attributes', JSON.stringify(fileData.shareAttributes))