mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-24 04:50:20 +03:00
prevent managers from creating collections (#6890)
managers without the access_all flag should not be able to create collections. the manage all collections permission actually consists of three separate custom permissions that have not been implemented yet for more fine-grain access control.
This commit is contained in:
@@ -514,7 +514,8 @@ impl Membership {
|
||||
"familySponsorshipValidUntil": null,
|
||||
"familySponsorshipToDelete": null,
|
||||
"accessSecretsManager": false,
|
||||
"limitCollectionCreation": self.atype < MembershipType::Manager, // If less then a manager return true, to limit collection creations
|
||||
// limit collection creation to managers with access_all permission to prevent issues
|
||||
"limitCollectionCreation": self.atype < MembershipType::Manager || !self.access_all,
|
||||
"limitCollectionDeletion": true,
|
||||
"limitItemDeletion": false,
|
||||
"allowAdminAccessToAllCollectionItems": true,
|
||||
|
||||
Reference in New Issue
Block a user