git.iko.soy/typeable/oauth2-proxy
on master help sign in
Adjust GitLab options configuration
commitc84a5a418fddc0df42ef51f89df79ec90cbdb440 authorNick Meves <nick.meves@greenhouse.io> dateSun 13 Jun 2021, 14:29 (5 years ago) parent3092941
2 files changed+3−5
pkg/validation/options.go+2−4 providers/gitlab_test.go+1−1
pkg/validation/options.go+2−4
@@ -276,13 +276,11 @@ func parseProviderInfo(o *options.Options, msgs []string) []string {
276276 msgs = append(msgs, "oidc provider requires an oidc issuer URL")
277277 }
278278 case *providers.GitLabProvider:
279− p.Groups = o.Providers[0].GitLabConfig.Group
280− err := p.AddProjects(o.Providers[0].GitLabConfig.Projects)
279+ p.SetAllowedGroups(o.Providers[0].GitLabConfig.Group)
280+ err := p.SetAllowedProjects(o.Providers[0].GitLabConfig.Projects)
281281 if err != nil {
282282 msgs = append(msgs, "failed to setup gitlab project access level")
283283 }
284− p.SetAllowedGroups(p.PrefixAllowedGroups())
285− p.SetProjectScope()
286284
287285 if p.Verifier == nil {
288286 // Initialize with default verifier for gitlab.com
providers/gitlab_test.go+1−1
@@ -228,7 +228,7 @@ var _ = Describe("Gitlab Provider Tests", func() {
228228 p.SetAllowedGroups(in.allowedGroups)
229229
230230 err := p.SetAllowedProjects(in.allowedProjects)
231− if err == nil {
231+ if in.expectedError == nil {
232232 Expect(err).To(BeNil())
233233 } else {
234234 Expect(err).To(MatchError(in.expectedError))