mirror of
https://github.com/nextcloud/server.git
synced 2026-04-05 00:56:16 -04:00
fix: update rename permissions check in files ui
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
63a4778744
commit
005b2b04e8
1 changed files with 9 additions and 4 deletions
|
|
@ -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 }) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue