Bug #21299
documentation of user_id in ssh_keys API controller is wrong
Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
Description
In API v2 ssh_keys_controller in :index and :show method the 'user_id' parameter is documented as not required.
https://github.com/theforeman/foreman/blob/develop/app/controllers/api/v2/ssh_keys_controller.rb#L12
https://github.com/theforeman/foreman/blob/develop/app/controllers/api/v2/ssh_keys_controller.rb#L21
param :user_id, String, :desc => N_("ID of the user")
It is part of the resource URL and needs to be required. Wrong documentation leads to problems with parameter resolving in Hammer CLI.
hammer user ssh-keys delete --user admin --name test Could not delete the SSH Key: missing param 'user_id' in parameters
Related issues
Associated revisions
Fixes #21299 - Make user_id required
user_id is part of the resource URL and needs to be mandatory.
(cherry picked from commit 5cb587b6990ceb5f368e493f772c6748bd07f9c8)
History
#1
Updated by Martin Bacovsky almost 5 years ago
- Subject changed from documentation of user_id in ssh_keys controller is wrong to documentation of user_id in ssh_keys API controller is wrong
#2
Updated by Martin Bacovsky almost 5 years ago
- Status changed from New to Assigned
- Assignee set to Martin Bacovsky
- Target version set to 226
- Difficulty set to easy
#3
Updated by Marek Hulán almost 5 years ago
- Related to Bug #20986: user_id parameter in ssh key create action is wrongly documented added
#4
Updated by Martin Bacovsky almost 5 years ago
- Project changed from Hammer CLI to Foreman
- Category changed from Users and roles to 218
#5
Updated by The Foreman Bot almost 5 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4907 added
#6
Updated by Timo Goebel almost 5 years ago
- Legacy Backlogs Release (now unused) set to 240
#7
Updated by Martin Bacovsky almost 5 years ago
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Applied in changeset 5cb587b6990ceb5f368e493f772c6748bd07f9c8.
#8
Updated by Tomer Brisker about 2 years ago
- Category changed from 218 to Users, Roles and Permissions
Fixes #21299 - Make user_id required
user_id is part of the resource URL and needs to be mandatory.