From 852117108646a16d4f40816ce0034e1c30f47d07 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Fri, 8 Dec 2023 16:45:29 +0100 Subject: [PATCH] fix(ACL): don't put inherited ACL permissions in the propPatch request payload Signed-off-by: Maksim Sukharev --- src/components/SharingSidebarView.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/SharingSidebarView.vue b/src/components/SharingSidebarView.vue index 6c52f1d88..d3b9069c1 100644 --- a/src/components/SharingSidebarView.vue +++ b/src/components/SharingSidebarView.vue @@ -309,7 +309,7 @@ export default { const rule = new Rule() rule.fromValues(option.type, option.id, option.displayname, 0b00000, 0b11111) this.list.push(rule) - client.propPatch(this.model, this.list).then(() => { + client.propPatch(this.model, this.list.filter(rule => !rule.inherited)).then(() => { this.showAclCreate = false }) }, @@ -319,7 +319,7 @@ export default { if (index > -1) { list.splice(index, 1) } - client.propPatch(this.model, list).then(() => { + client.propPatch(this.model, list.filter(rule => !rule.inherited)).then(() => { this.list.splice(index, 1) const inheritedAcl = this.inheritedAclsById[rule.getUniqueMappingIdentifier()] if (inheritedAcl != null) { @@ -347,7 +347,7 @@ export default { } item.inherited = false Vue.set(this.list, index, item) - client.propPatch(this.model, this.list).then(() => { + client.propPatch(this.model, this.list.filter(rule => !rule.inherited)).then(() => { // TODO block UI during save }) },