Skip to content

Commit

Permalink
Merge pull request #24 from appuio/fix-remove-users-pagination
Browse files Browse the repository at this point in the history
Remove users pagination by setting max to `-1`, correctly pass parameter
  • Loading branch information
bastjan committed Feb 28, 2022
2 parents 42495c6 + eabe398 commit 402033c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/pkg/keycloak/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ func (g *gocloakClient) GetUsers(ctx context.Context, realm string, params goclo
return nil, fmt.Errorf("failed binding to keycloak: %w", err)
}

return g.client.GetUsers(ctx, token.AccessToken, realm, gocloak.GetUsersParams{})
return g.client.GetUsers(ctx, token.AccessToken, realm, params)
}
2 changes: 1 addition & 1 deletion internal/pkg/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type UserSyncer struct {

func (u *UserSyncer) Sync(ctx context.Context, realm, attribute, targetLabel, targetAnnotation string) error {
users, err := u.KeycloakClient.GetUsers(ctx, realm, gocloak.GetUsersParams{
Max: gocloak.IntP(5000),
Max: gocloak.IntP(-1),
})
if err != nil {
return fmt.Errorf("error fetching users: %w", err)
Expand Down

0 comments on commit 402033c

Please sign in to comment.