mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-03 09:29:10 +01:00
remove special case
This commit is contained in:
parent
e99767c7e2
commit
6e1f3989e8
1 changed files with 0 additions and 7 deletions
|
@ -29,13 +29,6 @@ namespace BTCPayServer.Security.APIKeys
|
|||
protected override async Task HandleRequirementAsync(AuthorizationHandlerContext context,
|
||||
PolicyRequirement requirement)
|
||||
{
|
||||
//if it is a create user request, and the auth is not specified, and there are no admins in the system: authorize
|
||||
if (context.User.Identity.AuthenticationType == null && requirement.Policy == Policies.CanCreateUser.Key &&
|
||||
!(await _userManager.GetUsersInRoleAsync(Roles.ServerAdmin)).Any())
|
||||
{
|
||||
context.Succeed(requirement);
|
||||
}
|
||||
|
||||
if (context.User.Identity.AuthenticationType != APIKeyConstants.AuthenticationType)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue