diff --git a/pkg/login/social/connectors/generic_oauth.go b/pkg/login/social/connectors/generic_oauth.go index 02b93285e93..b0b148c884f 100644 --- a/pkg/login/social/connectors/generic_oauth.go +++ b/pkg/login/social/connectors/generic_oauth.go @@ -162,23 +162,6 @@ func (s *SocialGenericOAuth) Reload(ctx context.Context, settings ssoModels.SSOS return nil } -// TODOD: remove this in the next PR and use the isGroupMember from social.go -func (s *SocialGenericOAuth) isGroupMember(groups []string) bool { - if len(s.info.AllowedGroups) == 0 { - return true - } - - for _, allowedGroup := range s.info.AllowedGroups { - for _, group := range groups { - if group == allowedGroup { - return true - } - } - } - - return false -} - func (s *SocialGenericOAuth) isTeamMember(ctx context.Context, client *http.Client) bool { if len(s.teamIds) == 0 { return true diff --git a/pkg/login/social/connectors/okta_oauth.go b/pkg/login/social/connectors/okta_oauth.go index b91a73c92cb..7abd33f6db5 100644 --- a/pkg/login/social/connectors/okta_oauth.go +++ b/pkg/login/social/connectors/okta_oauth.go @@ -205,20 +205,3 @@ func (s *SocialOkta) getGroups(data *OktaUserInfoJson) []string { } return groups } - -// TODO: remove this in a separate PR and use the isGroupMember from the social.go -func (s *SocialOkta) isGroupMember(groups []string) bool { - if len(s.info.AllowedGroups) == 0 { - return true - } - - for _, allowedGroup := range s.info.AllowedGroups { - for _, group := range groups { - if group == allowedGroup { - return true - } - } - } - - return false -}