in pan-domain-auth-core/src/main/scala/com/gu/pandomainauth/service/Google2FAGroupChecker.scala [79:83]
def checkGroups(authenticatedUser: AuthenticatedUser, groupIds: List[String]): Either[String, Boolean] = {
val query = directory.groups().list().setUserKey(authenticatedUser.user.email)
if (groupIds.isEmpty) Left("No groups specified.")
else Right(groupIds.foldLeft(true){(acc, groupId) => acc & hasGroup(query, groupId)})
}