Auth: Cleanup duplicate isGroupMember methods from OAuth connectors (#115786)

Remove duplicate isGroupMember methods from OAuth connectors
This commit is contained in:
Akshat Sinha
2026-01-05 11:35:28 +01:00
committed by GitHub
parent 93566ce4ef
commit c05e1bd43a
2 changed files with 0 additions and 34 deletions
@@ -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
-17
View File
@@ -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
}