Project

General

Profile

Actions

Bug #21299

closed

documentation of user_id in ssh_keys API controller is wrong

Added by Martin Bacovsky about 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Users, Roles and Permissions
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

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 1 (0 open1 closed)

Related to Foreman - Bug #20986: user_id parameter in ssh key create action is wrongly documentedClosedTomáš StrachotaActions
Actions #1

Updated by Martin Bacovsky about 7 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
Actions #2

Updated by Martin Bacovsky about 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Martin Bacovsky
  • Target version set to 226
  • Difficulty set to easy
Actions #3

Updated by Marek Hulán about 7 years ago

  • Related to Bug #20986: user_id parameter in ssh key create action is wrongly documented added
Actions #4

Updated by Martin Bacovsky about 7 years ago

  • Project changed from Hammer CLI to Foreman
  • Category changed from Users and roles to 218
Actions #5

Updated by The Foreman Bot about 7 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4907 added
Actions #6

Updated by Timo Goebel about 7 years ago

  • Translation missing: en.field_release set to 240
Actions #7

Updated by Martin Bacovsky about 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #8

Updated by Tomer Brisker over 4 years ago

  • Category changed from 218 to Users, Roles and Permissions
Actions

Also available in: Atom PDF