diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-07-05 13:13:53 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-08-10 14:27:58 +0300 |
commit | dde4c9d9dfd5e4f241b0464667c0f2410d9851ed (patch) | |
tree | d8970db0d783cdbb6ab9d503600b9b19f956bc50 /apps | |
parent | 9c0e1d8252b15ec6319cabf3b0b46f19aa015669 (diff) |
Disable default actions in pending file list
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/gotoplugin.js | 5 | ||||
-rw-r--r-- | apps/files_sharing/js/app.js | 2 | ||||
-rw-r--r-- | apps/files_sharing/src/share.js | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/js/gotoplugin.js b/apps/files/js/gotoplugin.js index 4793420ed2d..d686c7850cf 100644 --- a/apps/files/js/gotoplugin.js +++ b/apps/files/js/gotoplugin.js @@ -29,6 +29,11 @@ if (this.disallowedLists.indexOf(fileList.id) !== -1) { return; } + // lists where the "Open" default action is disabled should + // also have the goto action disabled + if (fileList._defaultFileActionsDisabled) { + return + } var fileActions = fileList.fileActions; fileActions.registerAction({ diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js index b384946e5c8..89f72ee8209 100644 --- a/apps/files_sharing/js/app.js +++ b/apps/files_sharing/js/app.js @@ -141,6 +141,8 @@ OCA.Sharing.App = { { id: 'shares.pending', showPending: true, + detailsViewEnabled: false, + defaultFileActionsDisabled: true, sharedWithUser: true, fileActions: this._acceptShareAction(), config: OCA.Files.App.getFilesConfig(), diff --git a/apps/files_sharing/src/share.js b/apps/files_sharing/src/share.js index bb160f8715d..a7660a29f58 100644 --- a/apps/files_sharing/src/share.js +++ b/apps/files_sharing/src/share.js @@ -232,6 +232,10 @@ import escapeHTML from 'escape-html' }, type: OCA.Files.FileActions.TYPE_INLINE, actionHandler: function(fileName, context) { + // details view disabled in some share lists + if (!fileList._detailsView) { + return + } // do not open sidebar if permission is set and equal to 0 var permissions = parseInt(context.$file.data('share-permissions'), 10) if (isNaN(permissions) || permissions > 0) { |