diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-07-06 15:21:07 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-07-11 13:52:28 +0200 |
commit | a9f7e66d3dbdd7740aa7f308665d576d3a491378 (patch) | |
tree | cdb6969b4e9d5135baf5ea5f5a307dcc5929d282 /apps/files/src/actions/viewInFolderAction.ts | |
parent | 6f54f72bb40113662a9b906bebcf37393b45e9fa (diff) | |
download | nextcloud-server-a9f7e66d3dbdd7740aa7f308665d576d3a491378.tar.gz nextcloud-server-a9f7e66d3dbdd7740aa7f308665d576d3a491378.zip |
fix(files): actions permissions requirements
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/actions/viewInFolderAction.ts')
-rw-r--r-- | apps/files/src/actions/viewInFolderAction.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/src/actions/viewInFolderAction.ts b/apps/files/src/actions/viewInFolderAction.ts index 67e276112dc..2f603e6cf3a 100644 --- a/apps/files/src/actions/viewInFolderAction.ts +++ b/apps/files/src/actions/viewInFolderAction.ts @@ -19,7 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -import { Node, FileType } from '@nextcloud/files' +import { Node, FileType, Permission } from '@nextcloud/files' import { translate as t } from '@nextcloud/l10n' import FolderMoveSvg from '@mdi/svg/svg/folder-move.svg?raw' @@ -46,6 +46,10 @@ export const action = new FileAction({ return false } + if (node.permissions === Permission.NONE) { + return false + } + return node.type === FileType.File }, |