Description of problem: A user called "updater" with assigned Role called "updater" has the following permissions: Lifecycle Environments => edit_lifecycle_environments "content views" => view_content_views, edit_content_views, promote_or_remove_content_views Using this user to promote a content-view results in the following error: Could not promote the content view: Access denied Missing one of the required permissions: promote_or_remove_content_views As you can see the error message states "Missing one of the..." which is plural, but only lists ONE missing permission. In addition, this permission is already given to the user in question. What's really missing is the following permission: Lifecycle Environments => promote_or_remove_content_views_to_environment But the error message does not state this. This confused my customer and he opened a case. There's already a KCS for this but I think extending the error message to list all required permissions may be the better approach. Version-Release number of selected component (if applicable): Satellite 6.4.3 (customers Satellite on which the issue was reported) Satellite 6.5.0 (my test Satellite used to reproduce the issue) How reproducible: Steps to Reproduce: - create user "updater" - grant viewer role - create new role "updater" - apply filters to role "updater": -- "Lifecycle Environments" => edit_lifecycle_environments -- "content views" => view_content_views, edit_content_views, promote_or_remove_content_views Try to promote a content view with that user to get the error: [root@satellite ~]# hammer -u updater content-view version promote --content-view-id <ID> --to-lifecycle-environment-id <ID> --id <ID> --organization-id <ID> [Foreman] Password for updater: Could not promote the content view: Access denied Missing one of the required permissions: promote_or_remove_content_views Actual results: Could not promote the content view: Access denied Missing one of the required permissions: promote_or_remove_content_views Expected results: Could not promote the content view: Access denied Missing one of the required permissions: promote_or_remove_content_views, view_content_views, edit_content_views, promote_or_remove_content_views_to_environment Additional info:
this bug still exists in satellite 6.5.3...
Created redmine issue https://projects.theforeman.org/issues/31836 from this bug
Upstream bug assigned to iballou
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31836 has been resolved.
Steps to Test: - Deploy Satellite 6.9, snap 16. - Sync repositories, add them to a content view, and publish the content view. - Create a Lifecycle Environment Path with a "dev" lifecycle environment. - Create the "updater" user. - Add the "Viewer" role to the "updater" user. - Create the "updater" role. - Add the following filters to the "updater" role: - "Lifecycle Environments" > edit_lifecycle_environments - "Content Views" > view_content_views, edit_content_views, promote_or_remove_content_views - Attempt to promote the content view to the "dev" environment as the "updater" user: ~~~ [root@dhcp-3-161 ~]# 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: Could not find content_view_version resource with id 2. Potential missing permissions: promote_or_remove_content_views, promote_or_remove_content_views_to_environments ~~~ Expected Results: - The missing permission, "promote_or_remove_content_views_to_environments" is listed in the error message. Actual Results: - The missing permission, "promote_or_remove_content_views_to_environments" is listed in the error message. The problem description of this BZ suggests listing all required permissions in the error message; however, the current behavior lists all required permissions from only the relevant Resource Type (in this case, Lifecycle Environments). This narrower scope strikes me as more useful to a user attempting to troubleshoot this issue than listing all required permissions across all Resource Types. Verified in Satellite 6.9, snap 16 (tfm-rubygem-katello-3.18.1.11-1.el7sat.noarch).
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 (Moderate: Satellite 6.9 Release), 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-2021:1313