]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files_sharing): Don't show copy action when !canDownload and no update permissions
authorMarcel Klehr <mklehr@gmx.net>
Fri, 28 Apr 2023 10:33:26 +0000 (12:33 +0200)
committerMarcel Klehr (Rebase PR Action) <mklehr@gmx.net>
Tue, 2 May 2023 13:08:30 +0000 (13:08 +0000)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
apps/files_sharing/src/share.js

index 06eea5807a1d2f16f65bee713de73c82eb6b2a3a..a54f2f136986e96a4dce5605774199ec41af3e05 100644 (file)
@@ -94,7 +94,7 @@ import { getCapabilities } from '@nextcloud/capabilities'
                                }
                                if (_.isFunction(fileData.canDownload) && !fileData.canDownload()) {
                                        delete fileActions.actions.all.Download
-                                       if (fileData.permissions & OC.PERMISSION_UPDATE === 0) {
+                                       if ((fileData.permissions & OC.PERMISSION_UPDATE) === 0) {
                                                // neither move nor copy is allowed, remove the action completely
                                                delete fileActions.actions.all.MoveCopy
                                        }