mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Remoddeled the notificaiton settings to make it easier to add more. This is some techinical changes that no one except me will ever notice :(
This commit is contained in:
parent
0280f8149e
commit
dc63693bf6
11 changed files with 448 additions and 452 deletions
|
@ -175,14 +175,6 @@ namespace Ombi.UI.Modules
|
|||
isOwner = true;
|
||||
userId = GetOwnerId(plexSettings.PlexAuthToken, username);
|
||||
}
|
||||
UsersModel dbUser = await IsDbuser(username);
|
||||
if (dbUser != null) // in the db?
|
||||
{
|
||||
var perms = (Permissions) dbUser.Permissions;
|
||||
authenticated = true;
|
||||
isOwner = perms.HasFlag(Permissions.Administrator);
|
||||
userId = dbUser.UserGuid;
|
||||
}
|
||||
Log.Debug("Friends list result = {0}", authenticated);
|
||||
}
|
||||
else if (!settings.UserAuthentication) // No auth, let them pass!
|
||||
|
@ -207,14 +199,6 @@ namespace Ombi.UI.Modules
|
|||
authenticated = true;
|
||||
isOwner = true;
|
||||
}
|
||||
UsersModel dbUser = await IsDbuser(username);
|
||||
if (dbUser != null) // in the db?
|
||||
{
|
||||
var perms = (Permissions)dbUser.Permissions;
|
||||
authenticated = true;
|
||||
isOwner = perms.HasFlag(Permissions.Administrator);
|
||||
userId = dbUser.UserGuid;
|
||||
}
|
||||
Log.Debug("Friends list result = {0}", authenticated);
|
||||
}
|
||||
else if (!settings.UserAuthentication) // No auth, let them pass!
|
||||
|
@ -222,6 +206,16 @@ namespace Ombi.UI.Modules
|
|||
authenticated = true;
|
||||
}
|
||||
}
|
||||
|
||||
UsersModel dbUser = await IsDbuser(username);
|
||||
if (dbUser != null) // in the db?
|
||||
{
|
||||
var perms = (Permissions)dbUser.Permissions;
|
||||
authenticated = true;
|
||||
isOwner = perms.HasFlag(Permissions.Administrator);
|
||||
userId = dbUser.UserGuid;
|
||||
}
|
||||
|
||||
if (settings.UsePassword || isOwner || Security.HasPermissions(username, Permissions.Administrator))
|
||||
{
|
||||
Session[SessionKeys.UserLoginName] = username;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue