Bug #37555
closedImprove the error message when listing/viewing capsules via API w/o permissions
Description
Description of problem:
Sequel of BZ#2096930 to improve the error message.
Non-admin user needs the `view_smart_proxies` permission to list/view smart proxies via API, but he is advised he needs `manage_capsule_content` instead.
Version-Release number of selected component (if applicable):
6.15.0
How reproducible:
always
Steps to Reproduce:
1. Try to list/show an external capsule via API for a user with no permissions.
Actual results:
$ curl -k -u unauth:unauth https://satellite.redhat.com/katello/api/capsules/2
{
"error":
{"message":"Access denied","details":"Missing one of the required permissions: manage_capsule_content","missing_permissions":["manage_capsule_content"]}
}
Expected results:
$ curl -k -u unauth:unauth https://satellite.redhat.com/katello/api/capsules/2
{
"error":
{"message":"Access denied","details":"Missing one of the required permissions: view_smart_proxies","missing_permissions":["view_smart_proxies"]}
}
Updated by The Foreman Bot 4 months ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/11026 added
Updated by Chris Roberts 4 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|b6169e40997e4b756708333d21379378dfffa68b.
Updated by Chris Roberts 30 days ago
- Copied to Bug #37816: Improve the error message when listing/viewing capsules via API w/o permissions added