Add extension to ClaimsPrincipal
This commit is contained in:
@ -72,7 +72,7 @@
|
||||
StateHasChanged();
|
||||
|
||||
var state = await AuthenticationStateProvider.GetAuthenticationStateAsync();
|
||||
if (state.User.IsInRole(AppRole.ADMINISTRATOR_TYPE))
|
||||
if (state.User.IsAdministrator())
|
||||
{
|
||||
currentUserId = state.User.FindFirst(ClaimTypes.NameIdentifier)!.Value;
|
||||
usersWithRoles = await UsersService.GetUsersWithRoleAsync();
|
||||
|
||||
Reference in New Issue
Block a user