public IActionResult GetById(int id) { if (!AuthorizeUser.isMatchID(User, id) && !AuthorizeUser.isMatchRole(User, "admin")) { return(Forbid()); } var user = _userService.GetById(id); var userDto = _mapper.Map <UserResponse>(user); return(Ok(userDto)); }