mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Auth against the correct code this time
This commit is contained in:
parent
59126d1f25
commit
18afc46e5e
@ -86,8 +86,6 @@ public class ApiKeyAuthenticationHandler : AuthenticationHandler<ApiKeyAuthentic
|
||||
|
||||
if (authorKey != null)
|
||||
{
|
||||
if (await _tarLog.Contains(authorKey))
|
||||
return AuthenticateResult.Fail("Banned author key");
|
||||
|
||||
var owner = await _authorKeys.AuthorForKey(authorKey);
|
||||
if (owner == null)
|
||||
@ -100,6 +98,9 @@ public class ApiKeyAuthenticationHandler : AuthenticationHandler<ApiKeyAuthentic
|
||||
owner = "github/" + ghUser.Login;
|
||||
}
|
||||
|
||||
if (await _tarLog.Contains(owner))
|
||||
return AuthenticateResult.Fail("Banned author key");
|
||||
|
||||
var claims = new List<Claim> {new(ClaimTypes.Name, owner)};
|
||||
|
||||
claims.Add(new Claim(ClaimTypes.Role, "Author"));
|
||||
|
Loading…
Reference in New Issue
Block a user