More managed groups limit fixes (#5245)

* internal/handlers/managed_groups: ensure membership lookup is unlimited

Previously, we would only show the first 10,000 members in the group,
giving the impression that a complete list was performed. Now we
list all members.

* internal/handlers/accounts: ensure group lookup is unlimited

Previously, we would only show the first 10,000 managed group
memberships. Now we list all group memberships of an account.
This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2024-11-15 10:27:20 -08:00
1 parent d830bdd416
commit a2be306eb4
4 files changed
+29 -15

No files matched your search

@@ -446,7 +446,7 @@ func (s Service) getFromRepo(ctx context.Context, id string) (auth.ManagedGroup,
}
return nil, nil, err
}
ids, err := repo.ListManagedGroupMembershipsByGroup(ctx, mg.GetPublicId())
ids, err := repo.ListManagedGroupMembershipsByGroup(ctx, mg.GetPublicId(), oidc.WithLimit(-1))
if err != nil {
return nil, nil, err
}
@@ -469,7 +469,7 @@ func (s Service) getFromRepo(ctx context.Context, id string) (auth.ManagedGroup,
}
return nil, nil, err
}
ids, err := repo.ListManagedGroupMembershipsByGroup(ctx, mg.GetPublicId())
ids, err := repo.ListManagedGroupMembershipsByGroup(ctx, mg.GetPublicId(), ldap.WithLimit(ctx, -1))
if err != nil {
return nil, nil, err
}