Auth: Add azure warning for conflicting settings (#72289)

* add conflicting option debug warning

* add warning for Grafana Admin sync in auth config
This commit is contained in:
Jo
2023-07-25 18:07:16 +02:00
committed by GitHub
parent 348233bddb
commit e4649e7099
3 changed files with 8 additions and 2 deletions
+4
View File
@@ -108,6 +108,10 @@ func (s *SocialAzureAD) UserInfo(ctx context.Context, client *http.Client, token
isGrafanaAdmin = &grafanaAdmin
}
if s.allowAssignGrafanaAdmin && s.skipOrgRoleSync {
s.log.Debug("allowAssignGrafanaAdmin and skipOrgRoleSync are both set, Grafana Admin role will not be synced, consider setting one or the other")
}
return &BasicUserInfo{
Id: claims.ID,
Name: claims.Name,
+1 -1
View File
@@ -171,7 +171,7 @@ func (s *SocialGenericOAuth) UserInfo(ctx context.Context, client *http.Client,
}
if s.allowAssignGrafanaAdmin && s.skipOrgRoleSync {
s.log.Warn("allowAssignGrafanaAdmin and skipOrgRoleSync are both set, Grafana Admin role will not be synced, consider setting one or the other")
s.log.Debug("allowAssignGrafanaAdmin and skipOrgRoleSync are both set, Grafana Admin role will not be synced, consider setting one or the other")
}
if userInfo.Email == "" {