Issue Summary
When retrieving users who have a given permission (such as LICENSED_USER), either via REST (/rest/api/1.0/users) or the Java API (UserService.search with at least one included PermissionRequest on the UserSearchRequest), if the requested page size is greater than half the configured limit, users are dropped.
By default, the configured limit for users (page.max.users) is 1000. That means requesting a page size greater than 500 results in dropped users.
Steps to Reproduce
- Check licensed user count on the license screen
- Page over licensed users starting from /rest/api/1.0/users?permission=LICENSED_USER&limit=1000
- Observe that the total number of users returned via REST does not match the licensed user count
Expected Results
All users with the specified permission are returned.
Actual Results
A subset of the users are returned, with more or less dropped depending on the page size requested. (As in, requesting a page size of 501 will drop fewer users than requesting a page size of 1000.)
Notes
When retrieving users without filtering by permission, paging works without issue.
Workaround
Request a page size less than or equal to half the configured limit. By default, this means any page size of 500 or less will return all users. To allow requesting a larger page size, the configured limit must be raised to at least double the desired page size.
- is duplicated by
-
BSERV-11517 REST API: When limit parameter is used on user resource /rest/api/1.0/users unreliable results are retrieved
- Closed
- was split from
-
BSERV-7571 User management - filtering to just active (licensed) Bitbucket users
- Closed