Skip to content

Commit f48fa85

Browse files
icewind1991backportbot[bot]
authored andcommitted
fix: update rename permissions check in files ui
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 0fa6628 commit f48fa85

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

apps/files/src/actions/renameAction.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ export const action: IFileAction = {
3737
: filesStore.getNode(dirname(node.source))
3838
const parentPermissions = parentNode?.permissions || Permission.NONE
3939

40-
// Only enable if the node have the delete permission
41-
// and if the parent folder allows creating files
42-
return Boolean(node.permissions & Permission.DELETE)
43-
&& Boolean(parentPermissions & Permission.CREATE)
40+
// Enable if the node has update permissions or the node
41+
// has delete permission and the parent folder allows creating files
42+
return (
43+
(
44+
Boolean(node.permissions & Permission.DELETE)
45+
&& Boolean(parentPermissions & Permission.CREATE)
46+
)
47+
|| Boolean(node.permissions & Permission.UPDATE)
48+
)
4449
},
4550

4651
async exec({ nodes }) {

0 commit comments

Comments
 (0)