Bug #35588
closedPrevent the deletion of content credentials when they are in use
Description
Description of problem: =======================
Content credentials (e.g. GPG keys) that are in use by products or repositories in Satellite 6.x can be deleted. We need to implement a safety mechanism to prevent this from happening, and only allow content credentials that are no longer in use to be deleted.
Version-Release number of selected component (if applicable):
=============================================================
Red Hat Satellite 6.8, 6.9 and 6.10
How reproducible:
=================
Always
Steps to Reproduce: ===================
1. Create a GPG key in Red Hat Satellite's web UI under Content --> Content Credentials.
2. Create a custom product/repository in Red Hat Satellite's web UI, and configure it to use the GPG key created in step (1).
3. Go back to Content --> Content Credentials and deleted the GPG key.
Actual results: ===============
The GPG key is deleted.
Expected results: =================
As the GPG key is still in use by an existing product/repository, the deletion of the GPG key should be blocked.