Red Hat Bugzilla – Bug 1378544
Unable to remove cloned built-in roles
Last modified: 2017-07-17 08:33:15 EDT
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:
*** Bug 1379399 has been marked as a duplicate of this bug. ***
Encountered in 6.2.2 as well.
Upstream bug component is Search
Upstream bug component is Provisioning
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.
*** Bug 1383999 has been marked as a duplicate of this bug. ***
Created attachment 1212558 [details] roles-screenshot
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.
Created attachment 1216036 [details] patch fixing the bug
patch -p1 /usr/share/foreman/app/controllers/roles_controller.rb < 1378544.patch
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.
*** Bug 1417994 has been marked as a duplicate of this bug. ***
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.
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