Skip to content

Commit

Permalink
fix(get user information) : fix for all users
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdijafariii committed Sep 9, 2024
1 parent c2ffd83 commit 15a46d2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public async Task<IActionResult> GetPermissions()
var firstName = userClaims.FindFirstValue("firstname");
var lastName = userClaims.FindFirstValue("lastname");
var image = userClaims.FindFirstValue("image");

if (image is null)
{
image = "User do not have information yet !";
}
return Ok(new { image, firstName, lastName, permission });
}

Expand Down Expand Up @@ -96,7 +99,7 @@ await _userService.NewPasswordAsync(userClaim, newPasswordDto.OldPassword,
return Ok(new { massage = "reset successfully" });
}

[Authorize(Policy = "gold")]
[Authorize(Policy = "bronze")]
[HttpGet("get-user-information")]
public async Task<IActionResult> GetUserInformation()
{
Expand Down

0 comments on commit 15a46d2

Please sign in to comment.