finished #646 and fixed #664

This commit is contained in:
Jamie.Rees 2016-11-14 13:16:02 +00:00
parent 05bdfcd550
commit 55f1309140
41 changed files with 494 additions and 261 deletions

View file

@ -30,6 +30,7 @@ using System.Linq;
using System.Threading;
using Nancy;
using Nancy.Linker;
using Nancy.Security;
using Ninject;
using PlexRequests.Core;
@ -151,14 +152,14 @@ namespace PlexRequests.UI.Modules
get
{
var userRepo = ServiceLocator.Instance.Resolve<IUserRepository>();
return _security ?? (_security = new SecurityExtensions(userRepo, this));
var linker = ServiceLocator.Instance.Resolve<IResourceLinker>();
return _security ?? (_security = new SecurityExtensions(userRepo, this, linker));
}
}
private SecurityExtensions _security;
protected bool LoggedIn => Context?.CurrentUser != null;
protected string Culture { get; set; }