Skip to content

Commit

Permalink
fix: don't expose scope for non-admin users
Browse files Browse the repository at this point in the history
  • Loading branch information
o1egl committed Feb 21, 2022
1 parent c198723 commit 0942fc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ var userGetHandler = withSelfOrAdmin(func(w http.ResponseWriter, r *http.Request
}

u.Password = ""
if !u.Perm.Admin {
u.Scope = ""
}
return renderJSON(w, r, u)
})

Expand Down

0 comments on commit 0942fc7

Please sign in to comment.