-
Notifications
You must be signed in to change notification settings - Fork 95
Tenancy: tenant name need to be unique #711
Comments
If we make tenant name unique then we won't need tenant-uuid right? |
Yes. the "tenant_uuid" will not need if we make the "tenant_name" unique. Is there any use cases that require "tenant_name" not unique? I cannot think of any. @msterin |
Currently, the quick fix I made is to mark both "tenant_uuid" and "name" as primary key in "tenants" table. I also add some code in "create_tenant" function to check whether a tenant with the given name already exists or not. If the tenant already exists, return with error. The complete fix should be remove "tenant_uuid" from "tenants" table and also change corresponding SQL statements. |
Manually unit test:
|
As long as tenant rename is supported, we can stick with the name as a unique key |
In auth_data.py, we do have API "set_name" to change the name of a tenant. In AdminCLI, we do not have code to rename a tenant. |
#715 is filed to track the AdminCLI work to rename a tenant. |
Tenant name in "tenant table" need to be unique.
The text was updated successfully, but these errors were encountered: