mirror of
https://github.com/bitwarden/server.git
synced 2025-04-18 19:48:12 -05:00
dotnet format
This commit is contained in:
parent
5d5fb7fb27
commit
f7e2eb322d
@ -7,14 +7,14 @@ namespace Bit.Api.AdminConsole.Authorization.Requirements;
|
|||||||
|
|
||||||
public class ManageUsersRequirement : IOrganizationRequirement
|
public class ManageUsersRequirement : IOrganizationRequirement
|
||||||
{
|
{
|
||||||
public async Task<bool> AuthorizeAsync(
|
public async Task<bool> AuthorizeAsync(
|
||||||
CurrentContextOrganization? organizationClaims,
|
CurrentContextOrganization? organizationClaims,
|
||||||
Func<Task<bool>> isProviderUserForOrg)
|
Func<Task<bool>> isProviderUserForOrg)
|
||||||
=> organizationClaims switch
|
=> organizationClaims switch
|
||||||
{
|
{
|
||||||
{ Type: OrganizationUserType.Owner } => true,
|
{ Type: OrganizationUserType.Owner } => true,
|
||||||
{ Type: OrganizationUserType.Admin } => true,
|
{ Type: OrganizationUserType.Admin } => true,
|
||||||
{ Permissions.ManageUsers: true } => true,
|
{ Permissions.ManageUsers: true } => true,
|
||||||
_ => await isProviderUserForOrg()
|
_ => await isProviderUserForOrg()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user