Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1489324 - [CLI and API] Functionality of Assigning role to the user is missing
Summary: [CLI and API] Functionality of Assigning role to the user is missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks: 1122832 1373844
TreeView+ depends on / blocked
 
Reported: 2017-09-07 08:29 UTC by Jitendra Yejare
Modified: 2019-09-25 21:30 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20913 0 None None None 2017-09-13 18:51:42 UTC

Comment 4 Jitendra Yejare 2017-09-12 06:43:56 UTC
I dont think so its regression because I can see this in 6.2.z recent snaps as well.

Also the reason I set blocker because its the complete and basic functionality missing from hammer end.

Comment 6 Jitendra Yejare 2017-09-13 11:21:33 UTC
Same issue observed from API end as well.

Comment 7 Jitendra Yejare 2017-09-13 11:23:07 UTC
This issue is affecting test case execution/automation of 6.3 feature from API and CLI end. And that is the reason We would like to get this in 6.3

Comment 9 Marek Hulan 2017-09-13 18:51:40 UTC
Created redmine issue http://projects.theforeman.org/issues/20913 from this bug

Comment 11 Satellite Program 2017-09-13 20:05:54 UTC
Upstream bug assigned to mhulan

Comment 12 Satellite Program 2017-09-13 20:05:58 UTC
Upstream bug assigned to mhulan

Comment 13 Satellite Program 2017-09-14 08:06:04 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20913 has been resolved.

Comment 17 Jitendra Yejare 2017-12-04 10:43:45 UTC
Marek,

I saw that functionality is working from API end but somehow I don't see any options from hammer CLI to update the role of the user or while creating the user.

Is this expected? If yes, I think I cannot verify this bug as it also has CLI component in it to be fixed.

Comment 18 Marek Hulan 2017-12-07 12:48:16 UTC
Jitendra, did you try hammer -r user create --help? The cache of API must be reloaded if you created it in with version. I can see --role-ids and --roles and verified it works with latest snap.

satellite-6.3.0-22.0.el7sat.noarch
tfm-rubygem-hammer_cli-0.11.0.1-1.el7sat.noarch

Comment 19 Jitendra Yejare 2017-12-07 13:25:57 UTC
@Marek,

Yeah Actually I had satellite 6.3 which was upgraded from 6.3 last snap (i.e snap 26 to snap 27), may be some issues with it.

But I am checking on some other system, where I can see role options in create and update as well.

Create:
----------------

# hammer user create --login user_verify --mail r.u --password changeverify --auth-source-id 1 --role-ids 36
User [user_verify] created
# hammer user info --login user_verify
Id:                    9
Login:                 user_verify
Name:                   
Email:                 r.u
Admin:                 no
Last login:            
Authorized by:         Internal
Effective admin:       no
Locale:                default
Timezone:              default
Description:           
Default organization:  
Default location:      
Roles:                 
    Default role
    role_verify
User groups:           

Inherited User groups: 

Created at:            2017/12/07 13:18:56


Update:
----------

# hammer user update --login user_verify --role-ids 36
User [user_verify] updated
# hammer user info --login user_verify
Id:                    9
Login:                 user_verify
Name:                   
Email:                 r.u
Admin:                 no
Last login:            
Authorized by:         Internal
Effective admin:       no
Locale:                default
Timezone:              
Description:           
Default organization:  
Default location:      
Roles:                 
    Default role
    role_verify
User groups:           

Inherited User groups: 

Created at:            2017/12/07 13:18:56
Updated at:            2017/12/07 13:22:04


So as per comment 17, 18 and above hammer data, both CLI and API has options to update the role in user and create user with role is present.

Comment 20 Satellite Program 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.