Fixed a bug in the Login and added a unit test to cover that.

Added a button to approve an individual request.
Fixed some minor bugs in the request screen
This commit is contained in:
Jamie Rees 2016-03-10 19:58:32 +00:00
parent e6bd71a359
commit 452ad07ba0
17 changed files with 238 additions and 25 deletions

View file

@ -32,6 +32,7 @@ using Nancy.Responses.Negotiation;
using PlexRequests.Api.Interfaces;
using PlexRequests.Api.Models;
using PlexRequests.Api.Models.Plex;
using PlexRequests.Core;
using PlexRequests.Core.SettingModels;
using PlexRequests.UI.Models;
@ -61,10 +62,17 @@ namespace PlexRequests.UI.Modules
private Response LoginUser()
{
var username = Request.Form.username.Value;
if (string.IsNullOrWhiteSpace(username))
{
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Incorrect User or Password" });
}
var authenticated = false;
var settings = AuthService.GetSettings();
var username = Request.Form.username.Value;
if (IsUserInDeniedList(username, settings))
{