Check config before getting groups

This commit is contained in:
Joel Speed 2018-02-05 21:33:17 +00:00
parent 3f55e2da72
commit c03c98b951
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ func (c *googleConnector) createIdentity(ctx context.Context, identity connector
}
var groups []string
if s.Groups {
if s.Groups && c.adminEmail != "" && c.serviceAccountFilePath != "" {
groups, err = c.getGroups(claims.Email)
if err != nil {
return identity, fmt.Errorf("google: could not retrieve groups: %v", err)