Can't create repository within Product as non-admin user
Description of problem:
Cannot create repository within a product when granted full control through "product and repositories" filter (sync_products,create_products,edit_products,destroy_products,export_products)
Version-Release number of selected component (if applicable):
tested on 6.2.1 and 6.2.8
Steps to Reproduce:
1. User that is granted all permissions from "Product and repositories" filter
2. Create product
3. Create repository
"You are not authorized to perform this action"
Repository dialog allows user to create repo
User can create a product, and can successfully create product/repository through "Repo Discovery", but whenever trying to "Create Repository" within a product receiving error "You are not authorized to perform this action"
If an admin user creates the repository within the same product, the authorized user can modify,delete the repository.
fixes #19971 - allow repo create by non-admin and fix delete
Attempting to create a repository as a non-admin user would
generate the following error:
RuntimeError: Could not find a smart proxy with pulp feature. | .../smart_proxy_extensions.rb:60:in `default_capsule!'
Since we do not want to now require the user to have
an additional permission on smart proxies, we chose
to treat the default capsule as an unscoped query.
Also, observed that the UI behavior for the repository
deletion permissions was incorrect. It was treating the
repo behavior based upon the product, which is determined
by all repos in that product vs the one the user is