Browse Source

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

pull/7452/head
Raphaël Roumezin 23 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);
// 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,
});
}

4
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

Loading…
Cancel
Save