mirror of
https://github.com/grafana/grafana.git
synced 2026-08-18 17:15:08 -05:00
LDAP: validate organization role during parsing (#37188)
* LDAP: validate organization role during parsing * Trigger a new build * Check if grafana_admin is present
This commit is contained in:
@@ -153,6 +153,10 @@ func readConfig(configFile string) (*Config, error) {
|
||||
}
|
||||
|
||||
for _, groupMap := range server.Groups {
|
||||
if groupMap.OrgRole == "" && groupMap.IsGrafanaAdmin == nil {
|
||||
return nil, fmt.Errorf("LDAP group mapping: organization role or grafana admin status is required")
|
||||
}
|
||||
|
||||
if groupMap.OrgId == 0 {
|
||||
groupMap.OrgId = 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user