Skip to content

Commit

Permalink
Update User GetRole Func
Browse files Browse the repository at this point in the history
  • Loading branch information
mesquidar committed Nov 7, 2024
1 parent 6316593 commit 5a84425
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cervantes.Web/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ public async Task<string> GetRole(string userId)
var user2 = usrManager.GetByUserId(userId);

var rolUser = await authUsersAdminService.FindAuthUserByUserIdAsync(user2.Id);
if (rolUser.Result == null)
{
return String.Empty;
}
var test = rolUser.Result.UserRoles;

if (test.Count == 0)
Expand Down

0 comments on commit 5a84425

Please sign in to comment.