diff --git a/PlexRequests.UI/Helpers/HtmlSecurityHelper.cs b/PlexRequests.UI/Helpers/HtmlSecurityHelper.cs
index 1a3d70205..dfabdaaff 100644
--- a/PlexRequests.UI/Helpers/HtmlSecurityHelper.cs
+++ b/PlexRequests.UI/Helpers/HtmlSecurityHelper.cs
@@ -37,19 +37,16 @@ namespace PlexRequests.UI.Helpers
{
public static class HtmlSecurityHelper
{
- private static SecurityExtensions Security
+ private static ISecurityExtensions Security
{
-
get
{
- var userRepo = ServiceLocator.Instance.Resolve();
- var linker = ServiceLocator.Instance.Resolve();
- var plex = ServiceLocator.Instance.Resolve();
- return _security ?? (_security = new SecurityExtensions(userRepo, null, linker, plex));
+ var security = ServiceLocator.Instance.Resolve();
+ return _security ?? (_security = security);
}
}
- private static SecurityExtensions _security;
+ private static ISecurityExtensions _security;
public static bool HasAnyPermission(this HtmlHelpers helper, int permission, bool authenticated = true)
diff --git a/PlexRequests.UI/Helpers/SecurityExtensions.cs b/PlexRequests.UI/Helpers/SecurityExtensions.cs
index d6ff46122..ca2722743 100644
--- a/PlexRequests.UI/Helpers/SecurityExtensions.cs
+++ b/PlexRequests.UI/Helpers/SecurityExtensions.cs
@@ -38,16 +38,14 @@ namespace PlexRequests.UI.Helpers
{
public class SecurityExtensions : ISecurityExtensions
{
- public SecurityExtensions(IUserRepository userRepository, NancyModule context, IResourceLinker linker, IPlexUserRepository plexUsers)
+ public SecurityExtensions(IUserRepository userRepository, IResourceLinker linker, IPlexUserRepository plexUsers)
{
UserRepository = userRepository;
- Module = context;
Linker = linker;
PlexUsers = plexUsers;
}
private IUserRepository UserRepository { get; }
- private NancyModule Module { get; }
private IResourceLinker Linker { get; }
private IPlexUserRepository PlexUsers { get; }