From e33473077ae4f518fdd44685de44e8eb4b932fea Mon Sep 17 00:00:00 2001 From: stonezdj Date: Tue, 14 Aug 2018 17:43:04 +0800 Subject: [PATCH] Fix issue ldap_group_admin_dn doesn't take effect Signed-off-by: stonezdj --- src/ui/api/user.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/api/user.go b/src/ui/api/user.go index 5c3ec1aacab..60feda6fa41 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