Adjust GitLab options configuration
This commit is contained in:
		
							parent
							
								
									3092941c57
								
							
						
					
					
						commit
						c84a5a418f
					
				|  | @ -276,13 +276,11 @@ func parseProviderInfo(o *options.Options, msgs []string) []string { | ||||||
| 			msgs = append(msgs, "oidc provider requires an oidc issuer URL") | 			msgs = append(msgs, "oidc provider requires an oidc issuer URL") | ||||||
| 		} | 		} | ||||||
| 	case *providers.GitLabProvider: | 	case *providers.GitLabProvider: | ||||||
| 		p.Groups = o.Providers[0].GitLabConfig.Group | 		p.SetAllowedGroups(o.Providers[0].GitLabConfig.Group) | ||||||
| 		err := p.AddProjects(o.Providers[0].GitLabConfig.Projects) | 		err := p.SetAllowedProjects(o.Providers[0].GitLabConfig.Projects) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			msgs = append(msgs, "failed to setup gitlab project access level") | 			msgs = append(msgs, "failed to setup gitlab project access level") | ||||||
| 		} | 		} | ||||||
| 		p.SetAllowedGroups(p.PrefixAllowedGroups()) |  | ||||||
| 		p.SetProjectScope() |  | ||||||
| 
 | 
 | ||||||
| 		if p.Verifier == nil { | 		if p.Verifier == nil { | ||||||
| 			// Initialize with default verifier for gitlab.com
 | 			// Initialize with default verifier for gitlab.com
 | ||||||
|  |  | ||||||
|  | @ -228,7 +228,7 @@ var _ = Describe("Gitlab Provider Tests", func() { | ||||||
| 				p.SetAllowedGroups(in.allowedGroups) | 				p.SetAllowedGroups(in.allowedGroups) | ||||||
| 
 | 
 | ||||||
| 				err := p.SetAllowedProjects(in.allowedProjects) | 				err := p.SetAllowedProjects(in.allowedProjects) | ||||||
| 				if err == nil { | 				if in.expectedError == nil { | ||||||
| 					Expect(err).To(BeNil()) | 					Expect(err).To(BeNil()) | ||||||
| 				} else { | 				} else { | ||||||
| 					Expect(err).To(MatchError(in.expectedError)) | 					Expect(err).To(MatchError(in.expectedError)) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue