Project

General

Profile

Bug #12488

Missing API documentation for "Admin" user groups parameter

Added by Dominic Cleal over 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
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

Blocks Hammer CLI - Bug #12473: Cannot assign "Admin" role for User Groups through hammer cliClosed2015-11-13

Associated revisions

Revision 7f8a818e (diff)
Added by Martin Bacovsky over 3 years ago

Fixes #12488 - Add admin flag to usergroup param description

Revision 843b2224 (diff)
Added by Martin Bacovsky over 3 years ago

Fixes #12488 - Add admin flag to usergroup param description

(cherry picked from commit 7f8a818e5f46dbfcb97604d9036c7c4818ab063f)

History

#1 Updated by Dominic Cleal over 4 years ago

  • Copied from Bug #12473: Cannot assign "Admin" role for User Groups through hammer cli added

#2 Updated by Dominic Cleal over 4 years ago

  • Copied from deleted (Bug #12473: Cannot assign "Admin" role for User Groups through hammer cli)

#3 Updated by Dominic Cleal over 4 years ago

  • Blocks Bug #12473: Cannot assign "Admin" role for User Groups through hammer cli added

#4 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Martin Bacovsky
  • Pull request https://github.com/theforeman/foreman/pull/3705 added

#5 Updated by Dominic Cleal over 3 years ago

  • Category changed from Authorization to API
  • Legacy Backlogs Release (now unused) set to 175

#6 Updated by Martin Bacovsky over 3 years ago

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

#7 Updated by Martin Bacovsky over 3 years ago

  • Target version set to 1.7.0

Also available in: Atom PDF