Skip to content

Commit

Permalink
Merge pull request #5613 from stonezdj/fix_ldap_group_admin_dn_160
Browse files Browse the repository at this point in the history
Fix issue ldap_group_admin_dn doesn't take effect(1.6.0)
  • Loading branch information
ywk253100 authored Aug 15, 2018
2 parents 0b5b446 + e334730 commit 40f058f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ui/api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40f058f

Please sign in to comment.