mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 07:22:35 -07:00
Using Mailkit to fix #204
This commit is contained in:
parent
86fa887bce
commit
4fd3db1ae5
3 changed files with 52 additions and 40 deletions
|
@ -56,12 +56,22 @@ namespace PlexRequests.UI.Modules
|
|||
}
|
||||
}
|
||||
|
||||
protected bool IsAdmin { get {
|
||||
var claims = Context.CurrentUser.Claims.ToList();
|
||||
if(claims.Contains(UserClaims.Admin) || claims.Contains(UserClaims.PowerUser)){
|
||||
return true;}
|
||||
return false;
|
||||
} }
|
||||
protected bool IsAdmin
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Context.CurrentUser == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var claims = Context.CurrentUser.Claims.ToList();
|
||||
if (claims.Contains(UserClaims.Admin) || claims.Contains(UserClaims.PowerUser))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected int DateTimeOffset
|
||||
{
|
||||
|
@ -96,8 +106,8 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
var redirectPath = string.IsNullOrEmpty(baseUrl) ? "~/userlogin" : $"~/{baseUrl}/userlogin";
|
||||
|
||||
return Session[SessionKeys.UsernameKey] == null
|
||||
? Context.GetRedirect(redirectPath)
|
||||
return Session[SessionKeys.UsernameKey] == null
|
||||
? Context.GetRedirect(redirectPath)
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue