Description of problem: Cannot retrieve permissions for a particular resource, meanwhile docs says it should be possible. https://pulp-dev-guide.readthedocs.org/en/pulp-2.2/integration/rest-api/permission/retrieval.html#retrieval Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Retrieve permissions on a particular resource Actual results: Permissions on a specified resource not retrieved Expected results: Permissions on a specified resource retrieved Additional info: Listing permissions for all resources: # http --verify=no https://admin:admin@pulp.example.com/pulp/api/v2/permissions/ HTTP/1.1 200 OK Content-Length: 1121 Content-Type: application/json Date: Tue, 22 Oct 2013 12:20:26 GMT Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 [ { "_id": { "$oid": "525546d2da892d073367960f" }, "_ns": "permissions", "id": "525546d2da892d073367960f", "resource": "/v2/users/admin/", "users": { "admin": [ "READ", "UPDATE" ] } }, { "_id": { "$oid": "525d34abda892d07336798e1" }, "_ns": "permissions", "id": "525d34abda892d07336798e1", "resource": "/v2/tasks/aa0ef267-7bd3-482d-876c-2bf602b4b5f1/", "users": { "admin": [ null, null ] } }, { "_id": { "$oid": "525d35edda892d07336798f4" }, "_ns": "permissions", "id": "525d35edda892d07336798f4", "resource": "/v2/tasks/ee25189f-1f16-41ca-b065-fd2f7b5fabac/", "users": { "admin": [ null, null ] } }, { "_id": { "$oid": "525546d2da892d073367960d" }, "_ns": "permissions", "id": "525546d2da892d073367960d", "resource": "/v2/actions/login/", "users": { "admin": [ "READ", "UPDATE" ] } }, { "_id": { "$oid": "525546d2da892d073367960e" }, "_ns": "permissions", "id": "525546d2da892d073367960e", "resource": "/v2/actions/logout/", "users": { "admin": [ "READ", "UPDATE" ] } }, { "_id": { "$oid": "525546d2da892d0733679610" }, "_ns": "permissions", "id": "525546d2da892d0733679610", "resource": "/", "users": { "admin": [ "CREATE", "READ", "UPDATE", "DELETE", "EXECUTE" ] } } ] Using the id of the resource: # http --verify=no https://admin:admin@pulp.example.com/pulp/api/v2/permissions/525546d2da892d0733679610/ HTTP/1.1 404 Not Found Content-Type: text/html; charset=UTF-8 Date: Tue, 22 Oct 2013 12:22:20 GMT Server: Apache/2.4.6 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5 Transfer-Encoding: chunked not found
It actually works: # curl -H "Accept: application/json" -X GET -k -u admin:admin 'https://localhost/pulp/api/v2/permissions/?resource=%2Fv2%2Factions%2Flogin%2F' | python -m json.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 210 100 177 100 33 473 88 --:--:-- --:--:-- --:--:-- 474 [ { "_id": { "$oid": "54660ade6754762ed6e6bd38" }, "_ns": "permissions", "id": "54660ade6754762ed6e6bd38", "resource": "/v2/actions/login/", "users": { "admin": [ "READ", "UPDATE" ] } } ] I think an example how to do it would be helpful.
https://github.com/pulp/pulp/pull/1317
This commit is in master and 2.6-dev, changing state to MODIFIED and setting target release.
fixed in pulp 2.6.0-0.2.beta
Documented.
Moved to https://pulp.plan.io/issues/210