Issue #1933
closedRestricting fields on user search does not work as expected
Description
From https://pulp.plan.io/issues/1332#note-11
This is broken in 2.8.3. As an example, given an HTTP GET request to https://pulp.example.com/pulp/api/v2/users/search/?field=name
, the following response might be returned:
[{u'_href': u'/pulp/api/v2/users/None/',
u'_id': {u'$oid': u'5734c946e8ec9868b57fc652'},
u'login': None,
u'name': u'admin'},
{u'_href': u'/pulp/api/v2/users/None/',
u'_id': {u'$oid': u'5734d925e8ec98692112327b'},
u'login': None,
u'name': u'46f0b926-891b-4567-b6f8-fbe19e2e0c7c'},
{u'_href': u'/pulp/api/v2/users/None/',
u'_id': {u'$oid': u'5734d926e8ec986922fdec16'},
u'login': None,
u'name': u'051a9641-3e9d-47ad-9635-3b68e0b29d9b'},
{u'_href': u'/pulp/api/v2/users/None/',
u'_id': {u'$oid': u'5734d927e8ec986920331c71'},
u'login': None,
u'name': u'71195cb7-855e-4c83-8174-8169060d30ec'}]
The following Pulp Smash test cases demonstrate this issue:
- http://pulp-smash.readthedocs.io/en/latest/api/pulp_smash.tests.platform.api_v2.test_search.html#pulp_smash.tests.platform.api_v2.test_search.FieldTestCase
- http://pulp-smash.readthedocs.io/en/latest/api/pulp_smash.tests.platform.api_v2.test_search.html#pulp_smash.tests.platform.api_v2.test_search.FieldsTestCase
Updated by amacdona@redhat.com over 8 years ago
- Severity changed from 2. Medium to 1. Low
My guess is that this is probably related to which fields are required. In the above example, `login` is a required field and it is included, but set to None. I suggest Normal/Low.
Updated by amacdona@redhat.com over 8 years ago
- Version set to 2.8.3
ichimonji10 also reproduced this bug on 2.9
Updated by bmbouter almost 6 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter almost 6 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.