mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-11-14 00:36:04 +02:00
[PR 3] Add collection permissions for Custom Roles (#7951)
* Add Custom Roles collection permissions * Return NotFound for denied collection access * Grant Manage on imported collections to every Custom member
This commit is contained in:
10 files changed
+795
-268
No files matched your search
+4
-2
@@ -597,9 +597,11 @@ async fn update_membership_type(data: Json<MembershipTypeData>, token: AdminToke
|
||||
}
|
||||
}
|
||||
|
||||
// A Manager only becomes a Custom member if that changes nothing they may do
|
||||
// A Manager only becomes a Custom member if that changes nothing they may do. Here they would keep the permissions
|
||||
// they are shown with, the admin panel can't give up their access to all collections, so that is refused.
|
||||
if new_type == MembershipType::Custom
|
||||
&& let Some(loss) = member_to_edit.custom_role_conversion_loss(&conn).await
|
||||
&& let Some(loss) =
|
||||
member_to_edit.custom_role_conversion_loss(&member_to_edit.legacy_manager_permissions(), &conn).await
|
||||
{
|
||||
err!(loss)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user