From 7ce705be56f7df3391f9c8e2359e2fe512ca2fae Mon Sep 17 00:00:00 2001 From: Alexander Widak Date: Sun, 25 Oct 2026 16:49:12 +0100 Subject: [PATCH] Return stored manage flag for groups in collections/details (#7795) CollectionGroup::to_json_details_for_group derived manage from !read_only && !hide_passwords, so the group permission "Can edit items" was reported as "Can manage collection" by collections/details, while groups//details reported the stored value. Saving the collection access dialog in the web vault then persisted manage=true. Fixes #7794 Co-authored-by: Alexander Widak --- src/db/models/group.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/db/models/group.rs b/src/db/models/group.rs index 007ad375..c8df7ef2 100644 --- a/src/db/models/group.rs +++ b/src/db/models/group.rs @@ -137,15 +137,15 @@ impl CollectionGroup { } pub fn to_json_details_for_group(&self) -> Value { - // If both read_only and hide_passwords are false, then manage should be true - // You can't have an entry with read_only and manage, or hide_passwords and manage - // Or an entry with everything to false - // For backwards compatibility and migration proposes we keep checking read_only and hide_password + // Return the stored manage flag. Deriving it from !read_only && !hide_passwords turned the group + // permission "Can edit items" (readOnly=false, hidePasswords=false, manage=false) into "Can manage" + // in GET /organizations//collections/details, while GET /groups//details reported the stored + // value. Saving the collection access dialog then persisted manage=true. json!({ "id": self.groups_uuid, "readOnly": self.read_only, "hidePasswords": self.hide_passwords, - "manage": self.manage || (!self.read_only && !self.hide_passwords), + "manage": self.manage, }) } }