#nullable enable using Bit.Core.Context; namespace Bit.Api.AdminConsole.Authorization.Requirements; /// /// Requires that the user is a member of the organization or a provider for the organization. /// public class MemberOrProviderRequirement : IOrganizationRequirement { public async Task AuthorizeAsync( CurrentContextOrganization? organizationClaims, Func> isProviderUserForOrg) => organizationClaims is not null || await isProviderUserForOrg(); }