-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make description unique for tenant groups in MiqGroup #19272
Make description unique for tenant groups in MiqGroup #19272
Conversation
Just wanted to add that this is blocking: ManageIQ/manageiq-ui-classic#6143 |
Checked commit lpichler@27618dc with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
Also this now prevents users to create tenants with Foo/foo names. But the API does return 200 response even if though the tenant is not created. We should resolve this ASAP. At least make the API create_resource single transaction. |
I thought there was uniqueness among parents. So you could have the same tenant name, as long as it had a different parent. Not sure if this still works - and if it is a good approach. just saying the original (un-informed) decision |
@kbrock the problem is Basically if there is a tenant with parent "My Company" and name "Foo" it will generate group description "Group My Compnay/Foo" If you then want to create another tenant called just foo it will generate "Group My Company/foo" and is being case insensitively validate |
@Hyperkid123 well, case sensitivity is a problem. it should be case insensitive for sure |
@kbrock so should we add to tenants as well then? I have no problem with that i just want a solution so we can move forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - I was not reading properly
@lpichler Think we're ready to merge (ping me when you are ready)
After #17197 we distinguish case sensitive for column
description
in groups and there is no such validation forTenant#name
.When we create tenant then we are also creating so called tenant group and this group has generated description - base on related tenant name.
Issue:
A. create tenant with name = foo and description =foo
=> tenant (with name=foo and description =foo) is created
=> also related tenant group has been created with description (Tenant foo access )
B. create tenant with name = FOO and description =foo
=> tenant is not created because when default group is created it will generate description which was created in point 1 and it will fails on validation.
What we can do ?
Tenant#name
. (but in this case what to do with already created tenants with duplicated names "FOO", "Foo" ?)Links
cc @kbrock @Hyperkid123
WIP: Need to know whether this is good approach.