mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fixed the issue with user management, needed to implement our own authentication provider
This commit is contained in:
parent
63c2744336
commit
2a8927eb6d
46 changed files with 1132 additions and 565 deletions
22
PlexRequests.UI/Helpers/ISecurityExtensions.cs
Normal file
22
PlexRequests.UI/Helpers/ISecurityExtensions.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using Nancy;
|
||||
using Nancy.Security;
|
||||
using PlexRequests.Helpers.Permissions;
|
||||
|
||||
namespace PlexRequests.UI.Helpers
|
||||
{
|
||||
public interface ISecurityExtensions
|
||||
{
|
||||
Response AdminLoginRedirect(Permissions perm, NancyContext context);
|
||||
bool DoesNotHavePermissions(Permissions perm, IUserIdentity currentUser);
|
||||
bool DoesNotHavePermissions(int perm, IUserIdentity currentUser);
|
||||
Func<NancyContext, Response> ForbiddenIfNot(Func<NancyContext, bool> test);
|
||||
bool HasAnyPermissions(IUserIdentity user, params Permissions[] perm);
|
||||
bool HasPermissions(IUserIdentity user, Permissions perm);
|
||||
Response HasPermissionsRedirect(Permissions perm, NancyContext context, string routeName, HttpStatusCode code);
|
||||
Func<NancyContext, Response> HttpStatusCodeIfNot(HttpStatusCode statusCode, Func<NancyContext, bool> test);
|
||||
bool IsLoggedIn(NancyContext context);
|
||||
bool IsNormalUser(NancyContext context);
|
||||
bool IsPlexUser(NancyContext context);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue