Change how gitlab-group is parsed on options (#639)

* Changed how gitlab-group is parsed, from string to []string

See #637

* Point out that gitlab-group can be a list

See #637

* Reflect to the []string change on pkg/apis/options/options.go

See #637

* Move cfg option gitlab_group to gitlab_groups

See #637

* Renamed Group to Groups

See #637

* Reflect the change on gitlab.go as well

See #637

* Added #639

* Added the author of #639 to the CHANGELOG

* Add the gitlab_groups env change to CHANGELOG.md

See #639

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
İlteriş Eroğlu
2020-06-26 23:26:07 +01:00
committed by GitHub
co-authored by Joel Speed
parent daedbbd353
commit 1b6c54cae1
6 changed files with 16 additions and 11 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ type Options struct {
GitHubRepo string `flag:"github-repo" cfg:"github_repo"`
GitHubToken string `flag:"github-token" cfg:"github_token"`
GitHubUsers []string `flag:"github-user" cfg:"github_users"`
GitLabGroup string `flag:"gitlab-group" cfg:"gitlab_group"`
GitLabGroup []string `flag:"gitlab-group" cfg:"gitlab_groups"`
GoogleGroups []string `flag:"google-group" cfg:"google_group"`
GoogleAdminEmail string `flag:"google-admin-email" cfg:"google_admin_email"`
GoogleServiceAccountJSON string `flag:"google-service-account-json" cfg:"google_service_account_json"`
@@ -231,7 +231,7 @@ func NewFlagSet() *pflag.FlagSet {
flagSet.String("github-repo", "", "restrict logins to collaborators of this repository")
flagSet.String("github-token", "", "the token to use when verifying repository collaborators (must have push access to the repository)")
flagSet.StringSlice("github-user", []string{}, "allow users with these usernames to login even if they do not belong to the specified org and team or collaborators (may be given multiple times)")
flagSet.String("gitlab-group", "", "restrict logins to members of this group")
flagSet.StringSlice("gitlab-group", []string{}, "restrict logins to members of this group (may be given multiple times)")
flagSet.StringSlice("google-group", []string{}, "restrict logins to members of this google group (may be given multiple times).")
flagSet.String("google-admin-email", "", "the google admin to impersonate for api calls")
flagSet.String("google-service-account-json", "", "the path to the service account json credentials")
+1 -1
View File
@@ -330,7 +330,7 @@ func parseProviderInfo(o *options.Options, msgs []string) []string {
}
case *providers.GitLabProvider:
p.AllowUnverifiedEmail = o.InsecureOIDCAllowUnverifiedEmail
p.Group = o.GitLabGroup
p.Groups = o.GitLabGroup
p.EmailDomains = o.EmailDomains
if o.GetOIDCVerifier() != nil {