Chore: Remove unnecessary usage of DynamicSection from SocialService (#82139)

Remove unnecessary usage of DynamicSection
This commit is contained in:
Misi 2024-02-08 16:53:51 +01:00 committed by GitHub
parent 36a1f28086
commit 4a7dde5b97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 14 deletions

View File

@ -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
}

View File

@ -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]