diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-05 16:52:20 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-06 03:38:48 +0200 |
commit | be884eeaec0de15211ca6318f68bdd7a714f3baa (patch) | |
tree | 986f655cccc58ce9674b56b2dcc64f94121c1660 /apps | |
parent | 018af2a2fef7ae9f4057ad4c111b995201ef6e0b (diff) | |
download | nextcloud-server-be884eeaec0de15211ca6318f68bdd7a714f3baa.tar.gz nextcloud-server-be884eeaec0de15211ca6318f68bdd7a714f3baa.zip |
fix(files): "Edit locally" action should not be shown on public shares
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/src/actions/editLocallyAction.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/src/actions/editLocallyAction.ts b/apps/files/src/actions/editLocallyAction.ts index a2ffd6f054d..2471eaf40a5 100644 --- a/apps/files/src/actions/editLocallyAction.ts +++ b/apps/files/src/actions/editLocallyAction.ts @@ -12,6 +12,7 @@ import axios from '@nextcloud/axios' import LaptopSvg from '@mdi/svg/svg/laptop.svg?raw' import IconCancel from '@mdi/svg/svg/cancel.svg?raw' import IconCheck from '@mdi/svg/svg/check.svg?raw' +import { isPublicShare } from '@nextcloud/sharing/public' const confirmLocalEditDialog = ( localEditCallback: (openingLocally: boolean) => void = () => {}, @@ -90,6 +91,11 @@ export const action = new FileAction({ return false } + // does not work with shares + if (isPublicShare()) { + return false + } + return (nodes[0].permissions & Permission.UPDATE) !== 0 }, |