diff --git a/pkg/login/social/socialimpl/service.go b/pkg/login/social/socialimpl/service.go index b62201c3bd9..3dc66ff819e 100644 --- a/pkg/login/social/socialimpl/service.go +++ b/pkg/login/social/socialimpl/service.go @@ -84,11 +84,6 @@ func ProvideService(cfg *setting.Cfg, continue } - // Workaround for moving the SkipOrgRoleSync setting to the OAuthInfo struct - withOverrides := cfg.SectionWithEnvOverrides("auth." + name) - info.Enabled = withOverrides.Key("enabled").MustBool(false) - info.SkipOrgRoleSync = withOverrides.Key("skip_org_role_sync").MustBool(false) - if !info.Enabled { continue } diff --git a/pkg/login/social/socialimpl/service_test.go b/pkg/login/social/socialimpl/service_test.go index 9dc51e9448e..a1c703ea1ba 100644 --- a/pkg/login/social/socialimpl/service_test.go +++ b/pkg/login/social/socialimpl/service_test.go @@ -44,15 +44,6 @@ func TestSocialService_ProvideService(t *testing.T) { expectedSocialMapLength: 7, expectedGenericOAuthSkipOrgRoleSync: false, }, - { - name: "should load Enabled and SkipOrgRoleSync parameters from environment variables when ssoSettingsApi is disabled", - setup: func(t *testing.T, env *testEnv) { - t.Setenv("GF_AUTH_GENERIC_OAUTH_ENABLED", "true") - t.Setenv("GF_AUTH_GENERIC_OAUTH_SKIP_ORG_ROLE_SYNC", "true") - }, - expectedSocialMapLength: 2, - expectedGenericOAuthSkipOrgRoleSync: true, - }, } iniContent := ` [auth.azuread]