mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: Resolve isGrafanaAdmin for debug logging (#71145)
resolve isGrafanaAdmin for debug logging
This commit is contained in:
parent
49e42d1a8d
commit
932c24986d
@ -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{
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user