mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: OAuth sets skip_org_role_sync = true for auth.google by default (#72819)
* sets skip_org_role_sync to true for google * add google skiporgrolesync and sets to true always * add field * Update docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> * add AKS to words * script back to mina --------- Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
This commit is contained in:
@@ -102,7 +102,7 @@ auto_login = true
|
||||
|
||||
## Skip organization role sync
|
||||
|
||||
We do not currently sync roles from Google and instead set the AutoAssigned role to the user at first login. To manage your user's organization role from within Grafana, set `skip_org_role_sync` to `true`.
|
||||
We do not currently sync roles from Google and instead set the AutoAssigned role to the user at first login. The default setting for `skip_org_role_sync` is `true`, which means that role modifications can still be made through the user interface.
|
||||
|
||||
```ini
|
||||
[auth.google]
|
||||
|
||||
@@ -22,6 +22,7 @@ type SocialGoogle struct {
|
||||
*SocialBase
|
||||
hostedDomain string
|
||||
apiUrl string
|
||||
skipOrgRoleSync bool
|
||||
}
|
||||
|
||||
type googleUserData struct {
|
||||
|
||||
@@ -192,6 +192,7 @@ func ProvideService(cfg *setting.Cfg,
|
||||
SocialBase: newSocialBase(name, &config, info, cfg.AutoAssignOrgRole, cfg.OAuthSkipOrgRoleUpdateSync, *features),
|
||||
hostedDomain: info.HostedDomain,
|
||||
apiUrl: info.ApiUrl,
|
||||
skipOrgRoleSync: cfg.GoogleSkipOrgRoleSync,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1482,7 +1482,9 @@ func readAuthGithubSettings(cfg *Cfg) {
|
||||
func readAuthGoogleSettings(cfg *Cfg) {
|
||||
sec := cfg.SectionWithEnvOverrides("auth.google")
|
||||
cfg.GoogleAuthEnabled = sec.Key("enabled").MustBool(false)
|
||||
cfg.GoogleSkipOrgRoleSync = sec.Key("skip_org_role_sync").MustBool(false)
|
||||
// FIXME: for now we skip org role sync for google auth
|
||||
// as we do not sync organization roles from Google
|
||||
cfg.GoogleSkipOrgRoleSync = true
|
||||
}
|
||||
|
||||
func readAuthGitlabSettings(cfg *Cfg) {
|
||||
|
||||
Reference in New Issue
Block a user