/suggest/items and /suggest/properties are the REST API equivalents of wbsearchentities in the Action API. wbsearchentities has a maximum page size (limit) of 50 results for basic users, and 500 for users with the apihighlimits right. For /suggest, the maximum limit is 500 for all users.
This difference seems strange from the user perspective and also makes the underlying code unnecessarily complicated. We should consider applying the same limits to both.
AC:
- Limits are consistent with what is currently being done in the Action API
Task Breakdown Notes:
- check if the user has the apihighlimits right inside the use case validator (ItemPrefixSearchValidator)
- get the user name from request context in the route handlers (Item/PropertyPrefixSearchRouteHandler), see CRUD route handlers
- pass the username as part of the request object (ItemPrefixSearchRequest) into the use case (ItemPrefixSearch)
- transform user name string into user domain object (User) in the use case
- use case validator determines apihighlimits right for the user from its domain model (via newly created PermissionChecker)
- create a new PermissionChecker Domain Service (interface) with method hasApiHighLimits()
- implement PermissionChecker in the Infrastructure layer