fix: don't expose scope for non-admin users

This commit is contained in:
Oleg Lobanov committed 2022-02-21 20:17:42 +01:00
1 parent c1987237d0
commit 0942fc7042
1 file changed
+3
+3
View File
@@ -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)
})