Check config before getting groups
This commit is contained in:
		| @@ -200,7 +200,7 @@ func (c *googleConnector) createIdentity(ctx context.Context, identity connector | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	var groups []string | 	var groups []string | ||||||
| 	if s.Groups { | 	if s.Groups && c.adminEmail != "" && c.serviceAccountFilePath != "" { | ||||||
| 		groups, err = c.getGroups(claims.Email) | 		groups, err = c.getGroups(claims.Email) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return identity, fmt.Errorf("google: could not retrieve groups: %v", err) | 			return identity, fmt.Errorf("google: could not retrieve groups: %v", err) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user