|
|
@ -231,6 +231,8 @@ namespace PlexRequests.UI.Modules
|
|
|
|
if (loginGuid != Guid.Empty)
|
|
|
|
if (loginGuid != Guid.Empty)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!settings.UserAuthentication)// Do not need to auth make admin use login screen for now TODO remove this
|
|
|
|
if (!settings.UserAuthentication)// Do not need to auth make admin use login screen for now TODO remove this
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (dbUser != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var perms = (Permissions) dbUser.Permissions;
|
|
|
|
var perms = (Permissions) dbUser.Permissions;
|
|
|
|
if (perms.HasFlag(Permissions.Administrator))
|
|
|
|
if (perms.HasFlag(Permissions.Administrator))
|
|
|
@ -240,6 +242,17 @@ namespace PlexRequests.UI.Modules
|
|
|
|
return Response.AsRedirect(uri.ToString());
|
|
|
|
return Response.AsRedirect(uri.ToString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (plexLocal != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var perms = (Permissions)plexLocal.Permissions;
|
|
|
|
|
|
|
|
if (perms.HasFlag(Permissions.Administrator))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var uri = Linker.BuildRelativeUri(Context, "UserLoginIndex");
|
|
|
|
|
|
|
|
Session["TempMessage"] = Resources.UI.UserLogin_AdminUsePassword;
|
|
|
|
|
|
|
|
return Response.AsRedirect(uri.ToString());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(loginGuid == Guid.Empty && settings.UserAuthentication)
|
|
|
|
if(loginGuid == Guid.Empty && settings.UserAuthentication)
|
|
|
|