Fix: Local client factory when no user is specified would fail on some edge case auth scenarios

This commit is contained in:
Kukks 2022-07-01 09:03:32 +02:00
parent c12e08ef01
commit e511538ba6
No known key found for this signature in database
GPG key ID: 8E5530D9D1C93097

View file

@ -176,7 +176,10 @@ namespace BTCPayServer.Controllers.Greenfield
else
{
context.User =
new ClaimsPrincipal(new ClaimsIdentity(new List<Claim>(),
new ClaimsPrincipal(new ClaimsIdentity(new List<Claim>()
{
new(_identityOptions.CurrentValue.ClaimsIdentity.RoleClaimType, Roles.ServerAdmin)
},
$"Local{GreenfieldConstants.AuthenticationType}"));
}