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 1378544 - Unable to remove cloned built-in roles
Summary: Unable to remove cloned built-in roles
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.2.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
: 1379399 1383999 1417994 (view as bug list)
Depends On:
Blocks: 1417994 1426672
TreeView+ depends on / blocked
 
Reported: 2016-09-22 17:21 UTC by Brian Coca
Modified: 2020-03-11 15:15 UTC (History)
13 users (show)

Fixed In Version: foreman-1.11.0.72-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1417994 1426672 (view as bug list)
Environment:
Last Closed: 2017-05-01 13:55:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
roles-screenshot (9.25 KB, image/png)
2016-10-20 15:01 UTC, Peter Ondrejka
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16828 0 None None None 2016-10-07 09:15:29 UTC
Red Hat Product Errata RHBA-2017:1191 0 normal SHIPPED_LIVE Satellite 6.2.9 Async Bug Release 2017-05-01 17:49:42 UTC

Description Brian Coca 2016-09-22 17:21:12 UTC
Description of problem:
Unable to remove cloned built-in roles

Version-Release number of selected component (if applicable):
Satellite 6.2.1

How reproducible:
Every time

Steps to Reproduce:

Through Web UI
1. Find built in role
2. Clone built in role
3. Delete cloned built-in role

Deleting through CLI
1.# hammer role list
2.# hammer role info --id <number>
Id:      <number>
Name:    IPM Patching User
Builtin: No
3.# hammer role delete --id <number> <---Cloned built-in roles
4.Could not delete the user roles:
  Can't delete built-in role

Actual results:
web UI: No option to delete.
CLI: Could not delete the user roles:
  Can't delete built-in role

Expected results:
Able to delete cloned built-in role

Additional info:

Comment 1 Brad Buckingham 2016-09-30 16:01:32 UTC
*** Bug 1379399 has been marked as a duplicate of this bug. ***

Comment 5 Robert Foreman 2016-10-06 13:08:06 UTC
Encountered in 6.2.2 as well.

Comment 7 Bryan Kearney 2016-10-06 18:05:01 UTC
Upstream bug component is Search

Comment 10 Bryan Kearney 2016-10-07 10:04:41 UTC
Upstream bug component is Provisioning

Comment 11 Bryan Kearney 2016-10-10 12:04:54 UTC
Upstream bug component is Search

Comment 13 Marek Hulan 2016-10-13 07:13:29 UTC
While testing, please also verify following from duplicate BZ

Using Web UI
1. select any built in role. for e.g "Default user"
2. Clone the selected role
3. Now Go to users -> Select any User ->  'Click on roles tab'
4. search for new role, we can see that new role is not available.


Version-Release number of selected component (if applicable): 6.2.2


How reproducible: Always


Actual results: Unable to assign builtin cloned role to user.
 

Expected results: We should be able to assign any cloned roles to user.

Comment 14 Marek Hulan 2016-10-13 07:13:52 UTC
*** Bug 1383999 has been marked as a duplicate of this bug. ***

Comment 15 Peter Ondrejka 2016-10-20 15:01:12 UTC
Created attachment 1212558 [details]
roles-screenshot

Comment 16 Peter Ondrejka 2016-10-20 15:03:14 UTC
Verified in Sat 6.3 snap 5, a role created by cloning a built-in role can now be successfully removed both via UI or hammer.

Also, such cloned role is available to users, see the screenshot attached.

Comment 18 Stefan Nemeth 2016-11-01 09:58:27 UTC
Created attachment 1216036 [details]
patch fixing the bug

Comment 19 Stefan Nemeth 2016-11-01 10:00:09 UTC
patch -p1 /usr/share/foreman/app/controllers/roles_controller.rb < 1378544.patch

Comment 20 Lukas Zapletal 2017-02-24 15:27:01 UTC
REL ENG: TWO patches required, both small:

https://github.com/theforeman/foreman/pull/3925
https://github.com/theforeman/foreman/pull/4244

I already filed MR for the former one.

Comment 21 Bryan Kearney 2017-02-24 19:07:04 UTC
*** Bug 1417994 has been marked as a duplicate of this bug. ***

Comment 27 Peter Ondrejka 2017-03-27 14:18:45 UTC
Verified in Sat 6.2.9-1 using steps from the problem description and comment 13, role cloned from a default role can now be deleted and viewed by entitled users.

Comment 29 errata-xmlrpc 2017-05-01 13:55:05 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/RHBA-2017:1191


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