//You would normally protect this with [HasPermission(Permissions.Impersonate)], but I left that off on public IActionResult Index([FromServices] IListUsersService service) { if (User.InImpersonationMode()) { return(RedirectToAction(nameof(Message), new { errorMessage = "You are already in impersonation mode." })); } return(View(service.ListUserWithRolesAndDataTenant())); }
public IActionResult Users([FromServices] IListUsersService service) { return(View(service.ListUserWithRolesAndDataTenant())); }