From 005b2b04e85d04f6d1bafde1e27cf1ab5f0df9bb Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 6 Jan 2026 17:36:57 +0100 Subject: [PATCH] fix: update rename permissions check in files ui Signed-off-by: Robin Appelman --- apps/files/src/actions/renameAction.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/files/src/actions/renameAction.ts b/apps/files/src/actions/renameAction.ts index fb03416c9ee..28b2bcd29a8 100644 --- a/apps/files/src/actions/renameAction.ts +++ b/apps/files/src/actions/renameAction.ts @@ -37,10 +37,15 @@ export const action: IFileAction = { : filesStore.getNode(dirname(node.source)) const parentPermissions = parentNode?.permissions || Permission.NONE - // Only enable if the node have the delete permission - // and if the parent folder allows creating files - return Boolean(node.permissions & Permission.DELETE) - && Boolean(parentPermissions & Permission.CREATE) + // Enable if the node has update permissions or the node + // has delete permission and the parent folder allows creating files + return ( + ( + Boolean(node.permissions & Permission.DELETE) + && Boolean(parentPermissions & Permission.CREATE) + ) + || Boolean(node.permissions & Permission.UPDATE) + ) }, async exec({ nodes }) {