From 27f57fe1120bf6f3e2dd54bcb1bc7c6801fc8829 Mon Sep 17 00:00:00 2001 From: Eric Leijonmarck Date: Thu, 3 Aug 2023 14:56:11 +0200 Subject: [PATCH] Auth: Add missing skipOrgRoleSync property to SocialBase for GenericOAuth (#72752) * add missing cfg for skiporgrolesync * add google skiporgrolesync * removed google skip * update docs to reflect google * remove docs update for google --- pkg/login/social/generic_oauth.go | 1 + pkg/login/social/social.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/login/social/generic_oauth.go b/pkg/login/social/generic_oauth.go index 887c19006d2..20efb607b5b 100644 --- a/pkg/login/social/generic_oauth.go +++ b/pkg/login/social/generic_oauth.go @@ -27,6 +27,7 @@ type SocialGenericOAuth struct { teamIdsAttributePath string teamIds []string allowedGroups []string + skipOrgRoleSync bool } func (s *SocialGenericOAuth) IsGroupMember(groups []string) bool { diff --git a/pkg/login/social/social.go b/pkg/login/social/social.go index ad18fbac6de..46f21556a73 100644 --- a/pkg/login/social/social.go +++ b/pkg/login/social/social.go @@ -239,6 +239,7 @@ func ProvideService(cfg *setting.Cfg, teamIds: sec.Key("team_ids").Strings(","), allowedOrganizations: util.SplitString(sec.Key("allowed_organizations").String()), allowedGroups: util.SplitString(sec.Key("allowed_groups").String()), + skipOrgRoleSync: cfg.GenericOAuthSkipOrgRoleSync, } }