Skip to content

Tenant User List Action Pagination #18432

Open
@GeorgeMac

Description

@GeorgeMac

The new tenant user service enforces a page limit, but does not support configuring that limit via the usual limit query parameter.

The tenant storage ListUsers enforces a default page size of 20. But as this is not parsed from the request URL parameters, 20 is always enforced:

Default enforced here:

if o.Limit > influxdb.MaxPageSize || o.Limit == 0 {
o.Limit = influxdb.MaxPageSize
}

Need to add limit support to:

func decodeGetUsersRequest(ctx context.Context, r *http.Request) (*getUsersRequest, error) {
qp := r.URL.Query()
req := &getUsersRequest{}
if userID := qp.Get("id"); userID != "" {
id, err := influxdb.IDFromString(userID)
if err != nil {
return nil, err
}
req.filter.ID = id
}
if name := qp.Get("name"); name != "" {
req.filter.Name = &name
}
return req, nil
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions