Skip to content

Commit

Permalink
Update server/impl/src/main/java/com/walmartlabs/concord/server/user/…
Browse files Browse the repository at this point in the history
…UserResourceV2.java

Co-authored-by: Ivan Bodrov <[email protected]>
  • Loading branch information
laurayco and ibodrov authored Nov 14, 2024
1 parent f42937f commit e23952d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ public UserEntry get(@PathParam("id") UUID id) {

UUID authenticatedId = loggedIn.getId();

if(!authenticatedId.equals(id)) {
assertAdmin();
if(!authenticatedId.equals(id) && !Roles.isAdmin()) {
throw new UnauthorizedException("Users can only view their own information or must have admin privileges.");
}

return userDao.get(id);
Expand Down

0 comments on commit e23952d

Please sign in to comment.