Red Hat Bugzilla – Bug 1292157
Deletion of tenant is allowed when group exists with such tenant assigned
Last modified: 2016-06-29 11:21:47 EDT
Description of problem:
Deletion of tenant is allowed when there is group with this tenant assigned. This will cause that group will loose tenant membership. This is e.g. breaking Automate-Explorer.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create tenant1
2. Create new group called tenant1, assign super administrator role to it and tenant1 tenant
3. Create new user tenant1 and assign him into tenant1 group
4. Login as tenant1
5. navigate to Automate -> Explorer
You will see this message on the screen:
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
When you navigate to tenant1 group, there is no tenant assigned to this group, which is mandatory when creating new group.
In order to fix this, login as super administrator of My Company tenant and assign tenant to tenant1 group.
Also noticed that user which is not member of any tenant can login into CFME.
Tenant/child tenant/project cannot be deleted if there is group which is relying on this tenant/project.
This check should be implemented also for all child tenants.
Similar check is done when you try delete group which has members in it.
Detected commit referencing this ticket while ticket status is POST.
Milan: When this Pull Request has been merged, then move back to Post.
New commit detected on ManageIQ/manageiq/master:
Author: Milan Zazrivec <firstname.lastname@example.org>
AuthorDate: Wed Jan 6 14:18:05 2016 +0100
Commit: Milan Zazrivec <email@example.com>
CommitDate: Wed Jan 6 16:13:18 2016 +0100
Don't delete tenant with groups associated
app/models/tenant.rb | 5 +++++
spec/models/tenant_spec.rb | 8 ++++++++
2 files changed, 13 insertions(+)
Detected commit referencing this ticket while ticket status is MODIFIED.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.