diff --git a/src/ui/api/user.go b/src/ui/api/user.go index 5c3ec1aac..60feda6fa 100644 --- a/src/ui/api/user.go +++ b/src/ui/api/user.go @@ -116,6 +116,9 @@ func (ua *UserAPI) Get() { ua.CustomAbort(http.StatusInternalServerError, "Internal error.") } u.Password = "" + if ua.userID == ua.currentUserID { + u.HasAdminRole = ua.SecurityCtx.IsSysAdmin() + } ua.Data["json"] = u ua.ServeJSON() return