diff --git a/pkg/services/ldap/api/service.go b/pkg/services/ldap/api/service.go index 41a128f65c0..19b38fe4dac 100644 --- a/pkg/services/ldap/api/service.go +++ b/pkg/services/ldap/api/service.go @@ -277,8 +277,6 @@ func (s *Service) GetUserFromLDAP(c *contextmodel.ReqContext) response.Response return response.Error(http.StatusNotFound, "No user was found in the LDAP server(s) with that username", err) } - s.log.Debug("user found", "user", user) - name, surname := splitName(user.Name) u := &LDAPUserDTO{ diff --git a/pkg/services/ldap/ldap.go b/pkg/services/ldap/ldap.go index 75fd60b7e9d..e7cb7962347 100644 --- a/pkg/services/ldap/ldap.go +++ b/pkg/services/ldap/ldap.go @@ -306,7 +306,7 @@ func (server *Server) Users(logins []string) ( } server.log.Debug( - "LDAP users found", "users", fmt.Sprintf("%v", serializedUsers), + "LDAP users found", "users", fmt.Sprintf("%+v", serializedUsers), ) return serializedUsers, nil diff --git a/pkg/services/login/model.go b/pkg/services/login/model.go index f58aa6393f4..4ce46f6daa1 100644 --- a/pkg/services/login/model.go +++ b/pkg/services/login/model.go @@ -67,7 +67,12 @@ type ExternalUserInfo struct { } func (e *ExternalUserInfo) String() string { - return fmt.Sprintf("%+v", *e) + isGrafanaAdmin := "nil" + if e.IsGrafanaAdmin != nil { + isGrafanaAdmin = fmt.Sprintf("%v", *e.IsGrafanaAdmin) + } + return fmt.Sprintf("OAuthToken: %+v, AuthModule: %v, AuthId: %v, UserId: %v, Email: %v, Login: %v, Name: %v, Groups: %v, OrgRoles: %v, IsGrafanaAdmin: %v, IsDisabled: %v, SkipTeamSync: %v", + e.OAuthToken, e.AuthModule, e.AuthId, e.UserId, e.Email, e.Login, e.Name, e.Groups, e.OrgRoles, isGrafanaAdmin, e.IsDisabled, e.SkipTeamSync) } type LoginInfo struct {