Description of problem: when user call: /externalusers?search=test&pageno=1&pagesize=1 it returns more than one user. Version-Release number of selected component (if applicable): rhscon-core-0.0.8-4.el7.x86_64 rhscon-ceph-0.0.6-4.el7.x86_64 rhscon-ui-0.0.14-1.el7.noarch How reproducible: 100% Steps to Reproduce: 1. configure ldap 2. try to call externalusers with pagination parameters
Can you post here the output
It seems that above example works with search=test but: /externalusers?pageno=1&pagesize=1" {"totalcount":4,"startindex":1,"endindex":1,"users":null} /externalusers?pageno=1&pagesize=2" - only one user and there should be 2 users in result {"totalcount":4,"startindex":1,"endindex":2,"users":[{"username":"admin","email":"","role":"","groups":[""],"type":1,"status":false,"firstname":"","lastname":"Administrator","notificationenabled":false}]} Number of user is correct but user "admin" is first so I expect that he will be in 1st page: /externalusers?pageno=2&pagesize=1" {"totalcount":4,"startindex":2,"endindex":2,"users":[{"username":"admin","email":"","role":"","groups":[""],"type":1,"status":false,"firstname":"","lastname":"Administrator","notificationenabled":false}]} also I see just 3 users and totalcount is 4: {"totalcount":4,"startindex":1,"endindex":4,"users":[ * {"username":"admin","email":"","role":"","groups":[""],"type":1,"status":false,"firstname":"","lastname":"Administrator","notificationenabled":false}, * {"username":"testldap","email":"testldap, testldap, testldap2","role":"","groups":[""],"type":1,"status":false,"firstname":"Test","lastname":"Ldap","notificationenabled":false}, * {"username":"testldap2","email":"testldap2.brq.redhat.com","role":"","groups":[""],"type":1,"status":false,"firstname":"test2","lastname":"last2","notificationenabled":false}]} If numbers are not valid there should be error status return HTTP code instead of some default result. Not valid numbers for pagination: - negative numbers - zero so queries like: /externalusers?pageno=1&pagesize=-922 /externalusers?pageno=0&pagesize=90 /externalusers?pageno=0&pagesize=0 /externalusers?pageno=-10&pagesize=90 should return error status code.
Patch sent to upstream for review: https://review.gerrithub.io/#/c/275285/
Tested with rhscon-ceph-0.0.29-1.el7scon.x86_64 rhscon-core-0.0.29-1.el7scon.x86_64 rhscon-core-selinux-0.0.29-1.el7scon.noarch rhscon-ui-0.0.43-1.el7scon.noarch queries are OK, but there is not ERROR message in case of incorrect query params. ->FailedQA