mirror of
https://github.com/nextcloud/server.git
synced 2026-03-27 04:43:20 -04:00
fix(files): "Edit locally" action should not be shown on public shares
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
018af2a2fe
commit
be884eeaec
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue