Check config before getting groups
This commit is contained in:
parent
3f55e2da72
commit
c03c98b951
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue