summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-08-26 20:00:12 +0200
committerGitHub <noreply@github.com>2022-08-26 20:00:12 +0200
commit47584eee601594a066099b701e0ea61a5c8fec2a (patch)
tree472471347798c3a398698404b2ad1c59b20c7894 /apps/files_sharing
parentefbe9724076823a55485096a8ec88544410d791e (diff)
parentd1317e75409bdb2f37129ce07aee621bbe2b1a6c (diff)
downloadnextcloud-server-47584eee601594a066099b701e0ea61a5c8fec2a.tar.gz
nextcloud-server-47584eee601594a066099b701e0ea61a5c8fec2a.zip
Merge pull request #33713 from nextcloud/bugfix/noid/viewonlyfix
Diffstat (limited to 'apps/files_sharing')
-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))