From e5db5bcec74be612c68a023dfd32077d891c50c1 Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 15:13:09 +0200 Subject: [PATCH] [v10.1.x] Auth: Add missing skipOrgRoleSync property to SocialBase for GenericOAuth (#72818) 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 (cherry picked from commit 27f57fe1120bf6f3e2dd54bcb1bc7c6801fc8829) Co-authored-by: Eric Leijonmarck --- 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, } }