diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-08-26 11:09:18 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2022-08-26 14:18:47 +0200 |
commit | d1317e75409bdb2f37129ce07aee621bbe2b1a6c (patch) | |
tree | 543959ed8ab7e2a961ac08dfe8631074161b4799 /apps/files/js/fileactions.js | |
parent | c1df72fc8b578e201b89793c65755f767f5073c7 (diff) | |
download | nextcloud-server-d1317e75409bdb2f37129ce07aee621bbe2b1a6c.tar.gz nextcloud-server-d1317e75409bdb2f37129ce07aee621bbe2b1a6c.zip |
Remove copy in file actions when not allowed
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 9b86c6521ae..f342f21a4fb 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -673,6 +673,9 @@ displayName: function(context) { var permissions = context.fileInfoModel.attributes.permissions; if (permissions & OC.PERMISSION_UPDATE) { + if (!context.fileInfoModel.canDownload()) { + return t('files', 'Move'); + } return t('files', 'Move or copy'); } return t('files', 'Copy'); @@ -685,7 +688,11 @@ var permissions = context.fileInfoModel.attributes.permissions; var actions = OC.dialogs.FILEPICKER_TYPE_COPY; if (permissions & OC.PERMISSION_UPDATE) { - actions = OC.dialogs.FILEPICKER_TYPE_COPY_MOVE; + if (!context.fileInfoModel.canDownload()) { + actions = OC.dialogs.FILEPICKER_TYPE_MOVE; + } else { + actions = OC.dialogs.FILEPICKER_TYPE_COPY_MOVE; + } } var dialogDir = context.dir; if (typeof context.fileList.dirInfo.dirLastCopiedTo !== 'undefined') { |