aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-06-20 17:18:09 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-09-06 03:38:47 +0200
commitf0a765ee4645458d4781739f6d63a7326423d244 (patch)
treecc1b171b5b3d42372e77ecbfe160d3c38fefbddd /apps
parentf109c1a044c772b4827382c4b04d7928696f78fb (diff)
downloadnextcloud-server-f0a765ee4645458d4781739f6d63a7326423d244.tar.gz
nextcloud-server-f0a765ee4645458d4781739f6d63a7326423d244.zip
fix(files): Disable copy-move-action of single file shares
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/src/actions/moveOrCopyAction.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/src/actions/moveOrCopyAction.ts b/apps/files/src/actions/moveOrCopyAction.ts
index bf1cd67e2bf..13840540a38 100644
--- a/apps/files/src/actions/moveOrCopyAction.ts
+++ b/apps/files/src/actions/moveOrCopyAction.ts
@@ -265,7 +265,11 @@ export const action = new FileAction({
}
},
iconSvgInline: () => FolderMoveSvg,
- enabled(nodes: Node[]) {
+ enabled(nodes: Node[], view: View) {
+ // We can not copy or move in single file shares
+ if (view.id === 'public-file-share') {
+ return false
+ }
// We only support moving/copying files within the user folder
if (!nodes.every(node => node.root?.startsWith('/files/'))) {
return false