mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Fixed the bug in #438 and added unit tests to make so we dont break it in the future
This commit is contained in:
parent
9d82add7ae
commit
4d85000753
5 changed files with 468 additions and 308 deletions
|
@ -122,11 +122,11 @@ namespace PlexRequests.UI.Modules
|
|||
{
|
||||
get
|
||||
{
|
||||
if (Context.CurrentUser == null)
|
||||
if (Context?.CurrentUser == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var claims = Context.CurrentUser.Claims.ToList();
|
||||
var claims = Context?.CurrentUser.Claims.ToList();
|
||||
return claims.Contains(UserClaims.Admin) || claims.Contains(UserClaims.PowerUser);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue