mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 21:58:06 -05:00
remove unneeded check for has permission
This commit is contained in:
parent
fb54aac7b8
commit
0647ce81f3
@ -33,7 +33,7 @@ public class HasPermission : TagHelper
|
||||
var permissionLevel = _contextAccessor?.HttpContext?.User.Claims
|
||||
.FirstOrDefault(claim => claim.Type == ClaimTypes.Role)?.Value ?? EFClient.Permission.User.ToString();
|
||||
|
||||
var hasPermission = permissionLevel != null && _permissionSets.ContainsKey(permissionLevel) &&
|
||||
var hasPermission = _permissionSets.ContainsKey(permissionLevel) &&
|
||||
_permissionSets[permissionLevel].HasPermission(Entity, Permission);
|
||||
if (!hasPermission)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user