Bug #20913

Functionality of Assigning role to the user is missing

Added by Marek Hulán 2 months ago. Updated 2 months ago.

Status:Closed
Priority:Normal
Assigned To:Marek Hulán
Category:Users
Target version:-
Difficulty: Bugzilla link:1489324
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4829
Story points-
Velocity based estimate-
Release1.17.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1489324
Description of problem:
In Hammer, there is no option to assign role to the user.

The option is missing from both create user and update user command.

Version-Release number of selected component (if applicable):
Satellite 6.3.0 snap 14

How reproducible:
Always

Steps to Reproduce:
1. Create role
2. Create user
3. Attempt to assign role to the user

Actual results:
Hammer doesn't have option to assign role to the user.

Expected results:
Hammer should provide an option to assign role to the user

Additional info:

Following is the command output of update command:
  1. hammer user update --help
    Usage:
    hammer user update [OPTIONS]

Options:
--admin ADMIN is an admin account
One of true/false, yes/no, 1/0.
--auth-source-id AUTH_SOURCE_ID
--current-password CURRENT_PASSWORD Required when user want to change own password
--default-location DEFAULT_LOCATION_NAME Default location name
--default-location-id DEFAULT_LOCATION_ID
--default-organization DEFAULT_ORGANIZATION_NAME Default organization name
--default-organization-id DEFAULT_ORGANIZATION_ID
--description DESCRIPTION
--firstname FIRSTNAME
--id ID
--lastname LASTNAME
--locale LOCALE User's preferred locale
Possible value(s): 'ca', 'de', 'en', 'en_GB', 'es', 'fr', 'gl', 'it', 'ja', 'ko', 'pl', 'pt_BR', 'ru', 'sv_SE', 'zh_CN', 'zh_TW'
--location-ids LOCATION_IDS REPLACE locations with given ids
Comma separated list of values. Values containing comma should be double quoted
--locations LOCATION_NAMES Comma separated list of values. Values containing comma should be double quoted
--login LOGIN User's login to search by
--mail MAIL
--new-login NEW_LOGIN
--organization-ids ORGANIZATION_IDS REPLACE organizations with given ids.
Comma separated list of values. Values containing comma should be double quoted
--organizations ORGANIZATION_NAMES Comma separated list of values. Values containing comma should be double quoted
--password PASSWORD
--timezone TIMEZONE User's timezone
Possible value(s): 'American Samoa', 'International Date Line West', 'Midway Island', 'Hawaii', 'Alaska', 'Pacific Time (US & Canada)', 'Tijuana', 'Arizona', 'Chihuahua', 'Mazatlan', 'Mountain Time (US & Canada)', 'Central America', 'Central Time (US & Canada)', 'Guadalajara', 'Mexico City', 'Monterrey', 'Saskatchewan', 'Bogota', 'Eastern Time (US & Canada)', 'Indiana (East)', 'Lima', 'Quito', 'Atlantic Time (Canada)', 'Caracas', 'Georgetown', 'La Paz', 'Santiago', 'Newfoundland', 'Brasilia', 'Buenos Aires', 'Greenland', 'Montevideo', 'Mid-Atlantic', 'Azores', 'Cape Verde Is.', 'Casablanca', 'Dublin', 'Edinburgh', 'Lisbon', 'London', 'Monrovia', 'UTC', 'Amsterdam', 'Belgrade', 'Berlin', 'Bern', 'Bratislava', 'Brussels', 'Budapest', 'Copenhagen', 'Ljubljana', 'Madrid', 'Paris', 'Prague', 'Rome', 'Sarajevo', 'Skopje', 'Stockholm', 'Vienna', 'Warsaw', 'West Central Africa', 'Zagreb', 'Athens', 'Bucharest', 'Cairo', 'Harare', 'Helsinki', 'Jerusalem', 'Kaliningrad', 'Kyiv', 'Pretoria', 'Riga', 'Sofia', 'Tallinn', 'Vilnius', 'Baghdad', 'Istanbul', 'Kuwait', 'Minsk', 'Moscow', 'Nairobi', 'Riyadh', 'St. Petersburg', 'Volgograd', 'Tehran', 'Abu Dhabi', 'Baku', 'Muscat', 'Samara', 'Tbilisi', 'Yerevan', 'Kabul', 'Ekaterinburg', 'Islamabad', 'Karachi', 'Tashkent', 'Chennai', 'Kolkata', 'Mumbai', 'New Delhi', 'Sri Jayawardenepura', 'Kathmandu', 'Almaty', 'Astana', 'Dhaka', 'Urumqi', 'Rangoon', 'Bangkok', 'Hanoi', 'Jakarta', 'Krasnoyarsk', 'Novosibirsk', 'Beijing', 'Chongqing', 'Hong Kong', 'Irkutsk', 'Kuala Lumpur', 'Perth', 'Singapore', 'Taipei', 'Ulaanbaatar', 'Osaka', 'Sapporo', 'Seoul', 'Tokyo', 'Yakutsk', 'Adelaide', 'Darwin', 'Brisbane', 'Canberra', 'Guam', 'Hobart', 'Melbourne', 'Port Moresby', 'Sydney', 'Vladivostok', 'Magadan', 'New Caledonia', 'Solomon Is.', 'Srednekolymsk', 'Auckland', 'Fiji', 'Kamchatka', 'Marshall Is.', 'Wellington', 'Chatham Is.', 'Nuku'alofa', 'Samoa', 'Tokelau Is.'
-h, --help print help

Associated revisions

Revision 01ca6192
Added by Marek Hulán 2 months ago

Fixes #20913 - add missing role_ids to user API

History

#1 Updated by Marek Hulán 2 months ago

  • Subject changed from [Hammer] Functionality of Assigning role to the user is missing to Functionality of Assigning role to the user is missing
  • Category set to Users
  • Assigned To set to Marek Hulán

API does not expose role_ids attribute.

#2 Updated by The Foreman Bot 2 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4829 added

#3 Updated by Ivan Necas 2 months ago

  • Release set to 1.17.0

#4 Updated by Marek Hulán 2 months ago

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

Also available in: Atom PDF