Bug 1429624

Summary: "Upload Package" section not showing in the WebUI for non-admin user
Product: Red Hat Satellite Reporter: Christian Marineau <cmarinea>
Component: RepositoriesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Sanket Jagtap <sjagtap>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.7CC: abalakht, andrew.schofield, bbuckingham, egolov, emarquez, jcallaha, kabbott, mmccune, rbobek, sjagtap
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1480359 (view as bug list) Environment:
Last Closed: 2017-08-17 13:07:41 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:

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):
6.2.7

How reproducible:
100%

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. ***