fix(files_sharing): Don't show copy action when !canDownload and no update permissions

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2023-04-28 12:33:26 +02:00 committed by Marcel Klehr (Rebase PR Action)
parent 436a08893b
commit af665378f8

View 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
}