Description of problem:
Activation key can be deleted if it is part of a hostgroup, after successful deletion it still shows up in hostgroup configuration
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create an Activation Key
2. Create a hostgroup and that activation key to hostgroup.
3. Now delete the activation key created in Step1
4. Check under Activation Key of hostgroup, deleted activation key is still listed.
After deleting the activation key, it is still listed under hostgroup.
As activation key is part of hostgroup so Satellite should not allow to delete this key.
Secondly if activation key is deleted then it should be automatically removed from hostgroup as well, because it does not exist on Satellite server.
Connecting redmine issue https://projects.theforeman.org/issues/35386 from this bug
Upstream bug assigned to paji
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35386 has been resolved.
A warning was displayed when deleting a AK with HG connected.