Bug #28369
openWrong error message when trying to disable a Red Hat Repository
Description
Actual behavior:
When a user without the edit_products permission tries to disable a Red Hat Repository, the following error message is returned:
"Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to delete it."
If the user is given the edit_products permission, they are able to disable the repository successfully.
Expected behavior: The user should instead get a message referencing the required "edit_products" permission.
Steps to reproduce:
1. Create a role with the following permissions:
Subscription: delete_manifest, attach_subscriptions, unattach_subscriptions, manage_subscription_allocations, import_manifest, view_subscriptions
Product and Repositories: view_products
2. Create a user and attach this role and the Viewer role. Log in as (or impersonate) the user.
3. Navigate to {FOREMAN_URL}/redhat_repositories
4. If no repositories are enabled, enable one
5. Click the minus button (-) to attempt to disable a repository. The error will be displayed.
6. Log in as Admin. Edit the role you created and add the edit_products permission under Product and Repositories.
7. Log in as the limited user again. Navigate back to the Red Hat Repositories page and observe that you can now disable the repository without an error.
Updated by Chris Roberts over 5 years ago
- Target version set to Katello 3.15.0
- Difficulty set to easy
- Triaged changed from No to Yes
Updated by Jonathon Turel about 5 years ago
- Target version deleted (
Katello 3.15.0)
Updated by Jonathon Turel about 5 years ago
- Target version set to Katello Backlog
- Triaged changed from No to Yes