| Summary: | externalusers function does not support pagination properly | ||
|---|---|---|---|
| Product: | Red Hat Storage Console | Reporter: | Martin Kudlej <mkudlej> |
| Component: | core | Assignee: | Timothy Asir <tjeyasin> |
| core sub component: | authentication | QA Contact: | sds-qe-bugs |
| Status: | CLOSED WONTFIX | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | mkudlej, nthomas, tjeyasin |
| Version: | 2 | ||
| Target Milestone: | --- | ||
| Target Release: | 3 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | rhscon-ceph-0.0.23-1.el7scon.x86_64, rhscon-core-0.0.24-1.el7scon.x86_64, rhscon-ui-0.0.39-1.el7scon.noarch | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-03-23 04:06:10 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Martin Kudlej
2016-02-19 12:47:46 UTC
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 |