From 9929b087c24e17d541f6f9f2a700031369b7de3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Roumezin?= <94066559+RaphaelRoumezin@users.noreply.github.com> Date: Wed, 22 Jul 2026 15:17:46 +0200 Subject: [PATCH] fix: `limitItemDeletion`, `limitCollectionCreation` and `limitCollectionDeletion` display behaviour --- src/db/models/cipher.rs | 4 ++-- src/db/models/organization.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index ccc71f50..fcb7f30e 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -395,8 +395,8 @@ impl Cipher { json_object["viewPassword"] = json!(!hide_passwords); // The new key used by clients since v2025.6.0 json_object["permissions"] = json!({ - "delete": can_delete && self.deleted_at.is_none(), - "restore": can_delete && self.deleted_at.is_none(), + "delete": can_delete, + "restore": can_delete, }); } diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index 1d21dcc2..14e37621 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -557,9 +557,9 @@ impl Membership { "accessImportExport": false, "accessReports": false, // If the following 3 Collection roles are set to true a custom user has access all permission - "createNewCollections": membership_type == 4 && self.access_all, + "createNewCollections": membership_type == 4 && self.access_all && !org.collection_settings.limit_collection_creation, "editAnyCollection": membership_type == 4 && self.access_all, - "deleteAnyCollection": membership_type == 4 && self.access_all, + "deleteAnyCollection": membership_type == 4 && self.access_all && !org.collection_settings.limit_collection_deletion, "manageGroups": false, "managePolicies": false, "manageSso": false, // Not supported