Bug 1943272

Summary: Unclear / incomplete error message while trying to promote a content view with a user that has insufficient permissions
Product: Red Hat Satellite Reporter: James Jeffers <jjeffers>
Component: Content ViewsAssignee: Ian Ballou <iballou>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: high    
Version: 6.5.0CC: bkearney, egolov, fperalta, iballou, ivo.schindler, jjeffers, juwatts, pdwyer, pjasbuti, satellite6-bugs, sokeeffe, swachira, zhunting
Target Milestone: 6.8.6Keywords: EasyFix, FastFix, Reproducer, Triaged, UserExperience
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.16.0.26-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1722799 Environment:
Last Closed: 2021-04-13 18:45:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Permissions before
none
Permissions after none

Comment 7 jcallaha 2021-04-05 15:17:02 UTC
Verified in Satellite 6.8.6 Snap 1

Followed the reproducer steps, creating an "updater" user with the desired permissions. Upon trying to promote a content view version, I now see the inclusion of the more appropriate permission needed to perform this action.

-bash-4.2# hammer content-view version list --organization-id 1
---|-------------------------------|---------|-------------|-----------------------
ID | NAME                          | VERSION | DESCRIPTION | LIFECYCLE ENVIRONMENTS
---|-------------------------------|---------|-------------|-----------------------
2  | test 1.0                      | 1.0     |             | Library               
1  | Default Organization View 1.0 | 1.0     |             | Library               
---|-------------------------------|---------|-------------|-----------------------

-bash-4.2# hammer -u updater content-view version promote --content-view-id 2 --to-lifecycle-environment-id 2 --id 2 --organization-id 1
[Foreman] Password for updater: 
Could not promote the content view:
  Access denied
  Missing one of the required permissions: promote_or_remove_content_views, promote_or_remove_content_views_to_environments


After adding the missing permission "lifecycle environments => promote_or_remove_content_views_to_environments", the user is able to successfully promote the version.

-bash-4.2# hammer -u updater content-view version promote --content-view-id 2 --to-lifecycle-environment-id 2 --id 2 --organization-id 1
[Foreman] Password for updater: 
[........................................................................................] [100%]

Comment 8 jcallaha 2021-04-05 15:20:03 UTC
Created attachment 1769297 [details]
Permissions before

Comment 9 jcallaha 2021-04-05 15:20:32 UTC
Created attachment 1769298 [details]
Permissions after

Comment 14 errata-xmlrpc 2021-04-13 18:45:50 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 (Satellite 6.8.6 Async Bug Fix Update), 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-2021:1181