Project

General

Profile

Actions

Bug #12488

closed

Missing API documentation for "Admin" user groups parameter

Added by Dominic Cleal about 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

The "admin" boolean field isn't documented in the usergroups API controllers, should be there for Hammer to pick up.

(app/controllers/api/*/usergroups_controller.rb)


Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1281300
Description of problem:
Cannot assign "Admin" role for User Groups through hammer cli on Satellite 6.1.3

Version-Release number of selected component (if applicable):
  1. rpm -qa | grep hammer
    rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch
    rubygem-hammer_cli_katello-0.0.7.18-1.el7sat.noarch
    rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el7sat.noarch
    rubygem-hammer_cli_import-0.10.20-1.el7sat.noarch
    rubygem-hammer_cli-0.1.4.13-1.el7sat.noarch
    rubygem-hammer_cli_foreman-0.1.4.14-1.el7sat.noarch
    rubygem-hammer_cli_gutterball-0.0.1.3-1.el7sat.noarch
    rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el7sat.noarch
    rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. Try creating a usergroup and assign admin role

  1. hammer> role list
    ---|-----------------------
    ID | NAME
    ---|-----------------------
    1 | Discovery Reader
    2 | Discovery Manager
    3 | Tasks Manager
    4 | Tasks Reader
    5 | Red Hat Access Logs
    6 | Access Insights Viewer
    7 | Access Insights Admin
    8 | Boot disk access
    9 | Manager
    10 | Edit partition tables
    11 | View hosts
    12 | Edit hosts
    13 | Viewer
    14 | Site manager
    15 | Default user
    16 | Anonymous
    ---|-----------------------

hammer> user-group create --help
Usage:
user-group create [OPTIONS]

Options:
--name NAME
--role-ids ROLE_IDS Comma separated list of values.
--roles ROLE_NAMES Comma separated list of values.
--user-group-ids, --usergroup-ids USER_GROUP_IDS Comma separated list of values.
--user-groups, --usergroups USER_GROUP_NAMES Comma separated list of values.
--user-ids USER_IDS Comma separated list of values.
--users USER_LOGINS Comma separated list of values.
-h, --help print help

2. As we can see from the output of the hammer user-group create command there is no option to specify the role as "Admin"

3. This option does exists when creating UserGroups through Satellite webUI

Actual results:
No option to specify an Admin Role to a Usergroup created in Satellite 6.1.3

Expected results:
Admin role can be added to the Usergroup using the hammer command

Additional info:

hammer> user create --help >>>>>>> user creation has an option to specify whether the user is an admin or not.
Usage:
user create [OPTIONS]

Options:
--admin ADMIN is an admin account
One of true/false, yes/no, 1/0.
--auth-source-id AUTH_SOURCE_ID
--default-location-id DEFAULT_LOCATION_ID
--default-organization-id DEFAULT_ORGANIZATION_ID
--firstname FIRSTNAME
--lastname LASTNAME
--location-ids LOCATION_IDS Comma separated list of values.
--locations LOCATION_NAMES Comma separated list of values.
--login LOGIN
--mail MAIL
--organization-ids ORGANIZATION_IDS organization ID
Comma separated list of values.
--organizations ORGANIZATION_NAMES Comma separated list of values.
--password PASSWORD
-h, --help print help


Related issues 1 (0 open1 closed)

Blocks Hammer CLI - Bug #12473: Cannot assign "Admin" role for User Groups through hammer cliClosedMartin Bacovsky11/13/2015Actions
Actions

Also available in: Atom PDF