mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Merge branch 'develop' of https://github.com/tidusjar/Ombi into develop
This commit is contained in:
commit
8814d79d1a
1 changed files with 0 additions and 4 deletions
|
@ -168,7 +168,6 @@ namespace Ombi
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
|
context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
|
||||||
context.Response.RegisterForDispose(um);
|
|
||||||
await context.Response.WriteAsync("Invalid User Access Token");
|
await context.Response.WriteAsync("Invalid User Access Token");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -178,7 +177,6 @@ namespace Ombi
|
||||||
var roles = await um.GetRolesAsync(user);
|
var roles = await um.GetRolesAsync(user);
|
||||||
var principal = new GenericPrincipal(identity, roles.ToArray());
|
var principal = new GenericPrincipal(identity, roles.ToArray());
|
||||||
context.User = principal;
|
context.User = principal;
|
||||||
context.Response.RegisterForDispose(um);
|
|
||||||
await next();
|
await next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,7 +189,6 @@ namespace Ombi
|
||||||
if (!valid)
|
if (!valid)
|
||||||
{
|
{
|
||||||
context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
|
context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
|
||||||
context.Response.RegisterForDispose(settingsProvider);
|
|
||||||
await context.Response.WriteAsync("Invalid API Key");
|
await context.Response.WriteAsync("Invalid API Key");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -199,7 +196,6 @@ namespace Ombi
|
||||||
var identity = new GenericIdentity("API");
|
var identity = new GenericIdentity("API");
|
||||||
var principal = new GenericPrincipal(identity, new[] { "Admin", "ApiUser" });
|
var principal = new GenericPrincipal(identity, new[] { "Admin", "ApiUser" });
|
||||||
context.User = principal;
|
context.User = principal;
|
||||||
context.Response.RegisterForDispose(settingsProvider);
|
|
||||||
await next();
|
await next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue