Skip to content

Commit de3587d

Browse files
committed
fix: update rename permissions check in files ui
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 43842e5 commit de3587d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

apps/files/src/actions/renameAction.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ export const action = new FileAction({
3434
: filesStore.getNode(dirname(node.source))
3535
const parentPermissions = parentNode?.permissions || Permission.NONE
3636

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

4348
async exec({ nodes }) {

0 commit comments

Comments
 (0)