Skip to content

Commit 0b541bd

Browse files
ChrisPatesjjheinon
andauthored
Bug Fix : Release v2.3.3 (#270)
* Additional logging * Refining group member handling * Check USER is ACTIVE * Bugfix: Do not stop syncing if user was deleted and therefore no longer a member of the group. * sequence of operations * #268 * Added additional checks for an empty set of groups returned from an unreliable SDK. * Added checks for '/' so don't strip the path. --------- Co-authored-by: Janne Heinonen <[email protected]>
1 parent 8078b7b commit 0b541bd

File tree

3 files changed

+324
-82
lines changed

3 files changed

+324
-82
lines changed

internal/google/client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ func (c *client) GetGroups(query string) ([]*admin.Group, error) {
186186
}); err != nil {
187187
return nil, err
188188
}
189+
// Check we've got some users otherwise something is wrong.
190+
if len(g) == 0 {
191+
return nil, errors.New("google api return 0 groups?")
192+
}
189193
return g, err
190194
}
191195

@@ -204,7 +208,7 @@ func (c *client) GetGroups(query string) ([]*admin.Group, error) {
204208

205209
// Check we've got some users otherwise something is wrong.
206210
if len(g) == 0 {
207-
return g, errors.New("google api return 0 groups?")
211+
return nil, errors.New("google api return 0 groups?")
208212
}
209213
return g, err
210214
}

0 commit comments

Comments
 (0)