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 1379985 - [RFE] Clone role from CLI and API
Summary: [RFE] Clone role from CLI and API
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: Ondřej Pražák
QA Contact: Adam Ruzicka
URL:
Whiteboard:
Depends On:
Blocks: 1373844
TreeView+ depends on / blocked
 
Reported: 2016-09-28 11:05 UTC by Jitendra Yejare
Modified: 2019-08-12 14:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1470675 (view as bug list)
Environment:
Last Closed: 2018-02-21 16:49:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18317 0 Normal Closed Clone role from API 2020-03-23 18:12:14 UTC
Foreman Issue Tracker 18318 0 Normal Closed Add command to clone user role 2020-03-23 18:12:15 UTC

Description Jitendra Yejare 2016-09-28 11:05:40 UTC
Description of problem:
Currently role cannot be cloned from CLI and API,  and can only be cloned from UI. This RFE is to add that support.

Version-Release number of selected component (if applicable):
Satellite 6.3 snap 2

How reproducible:


Steps to Reproduce:
1. Attempt to clone a role from CLI and API
2.
3.

Actual results:
No option to clone a Role from CLI hammer or API.

Expected results:
Support should be added to clone a role from CLI and API.

Additional info:

Comment 1 Ondřej Pražák 2017-01-31 12:18:30 UTC
Created redmine issue http://projects.theforeman.org/issues/18317 from this bug

Comment 2 Ondřej Pražák 2017-01-31 12:26:00 UTC
Connecting redmine issue http://projects.theforeman.org/issues/18318 from this bug

Comment 3 Satellite Program 2017-03-14 12:04:11 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18318 has been resolved.

Comment 4 Adam Ruzicka 2017-08-02 09:23:29 UTC
Verified.
Satellite-6.3 Snap 9
Package versions:
satellite-6.3.0-16.0.beta.el7sat.noarch
tfm-rubygem-hammer_cli-0.10.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.10.2-1.el7sat.noarch

[root@snap9 ~]# hammer role clone --id 1 --new-name 'Cloned Tasks Managed'
User role cloned

[root@snap9 ~]# cat role_clone
{
        "name": "Cloned Tasks Manager 2"
}

[root@snap9 ~]# curl -X POST -k -H 'Content-Type: application/json' https://localhost/api/v2/roles/1/clone -u $LOGIN -d "$(<role_clone)" -i
HTTP/1.1 201 Created
Date: Wed, 02 Aug 2017 09:22:47 GMT
Server: Apache/2.4.6 (CentOS)
Foreman_version: 1.15.2
Foreman_api_version: 2
Apipie-Checksum: d27105eaf95e8a9c5bddae9e0d6aca3f
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: beef6c09-aaa2-4ebb-9182-3a94eb950837
X-Runtime: 0.117654
Content-Security-Policy: default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'
Strict-Transport-Security: max-age=631152000; includeSubdomains
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: sameorigin
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
X-Powered-By: Phusion Passenger 4.0.18
Set-Cookie: request_method=POST; path=/
Set-Cookie: _session_id=8a32e013079b304b2961f9f6a2dcf155; path=/; secure; HttpOnly
Location: https://localhost/roles/27-Cloned%20Tasks%20Manager%202
ETag: W/"ea2b6a48ace431aa687bba7aace3c5ea"
Status: 201 Created
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8

{"id":27,"name":"Cloned Tasks Manager 2","builtin":0,"description":null,"origin":null,"cloned_from_id":1}

Comment 5 Satellite Program 2018-02-21 16:49:54 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.