mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 15:32:37 -07:00
A bit more work on switching to using user claims so we can support multiple users
This commit is contained in:
parent
809b2bf0a8
commit
8a14427cea
2 changed files with 23 additions and 22 deletions
|
@ -23,6 +23,9 @@
|
|||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
using System.Linq;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
using Nancy;
|
||||
|
@ -55,7 +58,12 @@ namespace PlexRequests.UI.Modules
|
|||
}
|
||||
}
|
||||
|
||||
protected bool IsAdmin => Context.CurrentUser.IsAuthenticated();
|
||||
protected bool IsAdmin { get {
|
||||
var claims = Context.CurrentUser.Claims.ToList();
|
||||
if(claims.Contains(UserClaims.Admin) || claims.Contains(UserClaims.PowerUser)){
|
||||
return true;}
|
||||
return false;
|
||||
} }
|
||||
|
||||
protected int DateTimeOffset
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue