Actions
Bug #20120
closedPoor logging of 403 - forbidden responses
Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Team Backlog:
Description
When user has insufficient permissions for some action and the foreman replies 403, hammer prints quite a poor message without telling the user what permissions are required (even though server provides such info).
# With user without "View hosts" permissions: > hammer -u test host list Forbidden - server refused to process the request
The response from the server:
[ERROR 2017-06-27T11:15:48 API] 403 Forbidden [DEBUG 2017-06-27T11:15:48 API] { "error" => { "message" => "Access denied", "details" => "Missing one of the required permissions: view_hosts" } } [DEBUG 2017-06-27T11:15:48 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_forbidden [ERROR 2017-06-27T11:15:48 Exception] Forbidden - server refused to process the request
Expected results:
> hammer -u test host list Access denied Missing one of the required permissions: view_hosts
Updated by The Foreman Bot over 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/314 added
Updated by Marek Hulán over 7 years ago
- Target version changed from 1.14.0 to 1.14.3
Updated by Marek Hulán over 7 years ago
- Target version changed from 1.14.3 to 1.17.0-RC2
Updated by Marek Hulán over 7 years ago
- Target version changed from 1.17.0-RC2 to 1.18.0-RC2
Updated by Marek Hulán about 7 years ago
- Target version changed from 1.18.0-RC2 to 214
Updated by Anonymous about 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-foreman|33582c3261a850100eb1adc15e61d5e9d2fb2362.
Actions