Browse Source

fix: `limitItemDeletion`, `limitCollectionCreation` and `limitCollectionDeletion` display behaviour

pull/7452/head
Raphaël Roumezin 21 hours ago
parent
commit
9929b087c2
  1. 4
      src/db/models/cipher.rs
  2. 4
      src/db/models/organization.rs

4
src/db/models/cipher.rs

@ -395,8 +395,8 @@ impl Cipher {
json_object["viewPassword"] = json!(!hide_passwords); json_object["viewPassword"] = json!(!hide_passwords);
// The new key used by clients since v2025.6.0 // The new key used by clients since v2025.6.0
json_object["permissions"] = json!({ json_object["permissions"] = json!({
"delete": can_delete && self.deleted_at.is_none(), "delete": can_delete,
"restore": can_delete && self.deleted_at.is_none(), "restore": can_delete,
}); });
} }

4
src/db/models/organization.rs

@ -557,9 +557,9 @@ impl Membership {
"accessImportExport": false, "accessImportExport": false,
"accessReports": false, "accessReports": false,
// If the following 3 Collection roles are set to true a custom user has access all permission // 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, "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, "manageGroups": false,
"managePolicies": false, "managePolicies": false,
"manageSso": false, // Not supported "manageSso": false, // Not supported

Loading…
Cancel
Save