Bug 1429624 - "Upload Package" section not showing in the WebUI for non-admin user
Summary: "Upload Package" section not showing in the WebUI for non-admin user
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Sanket Jagtap
: 1415204 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2017-03-06 17:23 UTC by Christian Marineau
Modified: 2020-12-14 08:18 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1480359 (view as bug list)
Last Closed: 2017-08-17 13:07:41 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17481 0 None None None 2017-03-08 19:15:20 UTC
Red Hat Bugzilla 1415204 0 medium CLOSED non admin user is not able to upload packages to the yum type repository 2021-02-22 00:41:40 UTC

Internal Links: 1415204

Description Christian Marineau 2017-03-06 17:23:24 UTC
Description of problem:
When setting a custom role and adjusting the filters to allow a non-admin user to modify a repository, it works correctly via hammer cli. However from the web interface, the "Package Upload" section in not displayed on the repository page.

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

How reproducible:

Steps to Reproduce:
1. Have a custom Product and Repository where you would upload your specific rpm
   Example: Product: Custom_Product
            Repository: Custom_Repo

2. Create a new role "Custom_bug_role"

3. Create the following 2 filters for that role
   Filter 1
     Resource type: Organization
     Permission: view_organizations
     Search filter: name = "MyOrg"

   Filter 2
     Resource type: Product and Repositories
     Permission: view_products, edit_products, sync_products
     Search filter: name = "Custom_Repo"

4. Create a test user and assign the custom role
     Username: Test_bug_user
     Role: Custom_bug_role

5. Test the permission using hammer cli, trying to upload a package will be successful for the non admin Test_bug_user
   # hammer -u Test_bug_user -p testbug repository upload-content --product Custom_Product --name Custom_Repo --organization MyOrg --path test.rpm
   Successfully uploaded file 'test.rpm'.

6. Log in the webui with Test_bug_user, navigate to Content > Products, then access the Custom_Repo page. Here we can see information like "Content Counts", but we do not see the "Package Upload" section, despite having the right level of access (confirmed via the hammer command).

Actual results:
From the WebUI, the "Upload Package" section is not displayed at all on the repository page, but we can upload via the hammer cli with the same user.

Expected results:
Have the "Upload Package" section displayed according to role filters

Additional info:
I tried many combination and noticed only user with Admin role check seems to be able to see the section in the WebUI.

Comment 2 Brad Buckingham 2017-03-08 19:15:20 UTC
Investigated and this has been solved in the upstream.  Linking the upstream solution to the bugzilla.

Comment 4 Brad Buckingham 2017-05-31 19:42:48 UTC
*** Bug 1415204 has been marked as a duplicate of this bug. ***

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