Bug 1304815

Summary: Non-admin user can not add or Remove Host Collection to or from Activation Key.
Product: Red Hat Satellite Reporter: Prakash Ghadge <pghadge>
Component: Users & RolesAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: high    
Version: 6.1.5CC: akofink, bbuckingham, bgh, bkearney, cpatters, dgupte, dhawke, jcallaha, jnikolak, mgrigull, mmccune, oshtaier, satellite6-bugs, sauchter, sthirugn, xdmoon, zhunting
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.0.0.86-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1394389 (view as bug list) Environment:
Last Closed: 2016-12-12 17:10:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1316897, 1394389    
Attachments:
Description Flags
verification screenshot
none
role permissions none

Description Prakash Ghadge 2016-02-04 17:05:58 UTC
Description of problem:

When logging on with a non admin user with an role with all rights on Activation Key and Host Collections, it is not possible to Add or Remove Host Collections from Activation Keys. The add or remove button is not present.


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

Satellite 6.1

How reproducible:

Always

Steps to Reproduce:
User logged on to Satellite webinterface with:
   - No admin rights
   - Role assigned with:
      - create_activation_keys, edit_activation_keys, destroy_activation_keys, view_activation_keys permissions on Activation Keys
      - view_host_collections, create_host_collections, edit_host_collections, destroy_host_collections on Host Collections
- Navigate to: Content --> Activation Keys --> Select existing Activation Key --> TAB Host Collections
- No Add or Remove button is visible to be able to add or remove host collections from the Activation Key, 


Actual results:

No add or remove button.

Expected results:

webUI should provide add and remove button for non-admin user.

Comment 5 jnikolak 2016-10-14 01:40:12 UTC
*** Bug 1384728 has been marked as a duplicate of this bug. ***

Comment 8 Brad Buckingham 2016-10-18 15:28:39 UTC
Created redmine issue http://projects.theforeman.org/issues/16997 from this bug

Comment 9 Brad Buckingham 2016-10-18 15:48:13 UTC
Proposed fix in Katello PR: https://github.com/Katello/katello/pull/6402

Comment 10 jnikolak 2016-10-20 02:33:07 UTC
I tested this under Satellite 6.1.10
Customer tested this under Satellite 6.2.2
--> foreman-1.11.0.53-1.el7sat.noarch


He has also reported that subscriptions are not showing up (which is a more major defect) when using a non-admin role.

When using an admin role, the subscriptions do show.
I'm currently verifying if I'm seeing the situation with roles on my Satellite.

Comment 11 jnikolak 2016-10-21 00:10:21 UTC
In 6.2.2 I've confirmed that if you add all Roles, or specify a Role with everything, that there isn't a way to view the subscription inside the activation key.

Is it possible to get the missing subscription inside the activation key also resolved.

Comment 12 Brad Buckingham 2016-10-21 19:06:03 UTC
It looks like the issue raised by comment 10 and 11 has already been addressed by bug 1333219.  If it is Ok, we'll keep this one focused on the initial issue raised for host collections.

Comment 13 jnikolak 2016-11-13 23:21:20 UTC
Yes it will be fine to focus on host collections.

Comment 18 jcallaha 2016-12-01 21:00:35 UTC
Verified in Satellite 6.2.5

Create a user with only the required permissions and was able to successfully view/add/remove host collections from the activation key. see attached screenshots

Comment 19 jcallaha 2016-12-01 21:01:20 UTC
Created attachment 1227015 [details]
verification screenshot

Comment 20 jcallaha 2016-12-01 21:02:34 UTC
Created attachment 1227016 [details]
role permissions

Comment 22 errata-xmlrpc 2016-12-12 17:10:19 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-2016:2940

Comment 23 Stuart Auchterlonie 2016-12-13 23:20:25 UTC
*** Bug 1404474 has been marked as a duplicate of this bug. ***