mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
return;
|
||||
}
|
||||
if (response.users.length > 1) {
|
||||
$(response).each(function () {
|
||||
$(response.users).each(function () {
|
||||
$('#users').append("<option>" + this + "</option>");
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue