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