You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As GORM 6 has support for multi tenancy, scaffolded controllers for multi tenant domains should take into account the current tenant, which RestfulController (the super class for scaffolded controllers) don't.
ScaffoldingControllerInjector should detect that:
GORM 6 is being used
The scaffold property points to a domain class that implements MultiTenancy
If "1" and "2" are true, then the super class must be something that exposes the same actions as RestfulController but whose actions are tenant id aware, like: def delete() { Tenants.withCurrent { resource.withTransaction { transactionStatus -> ... } } }
If "1" or "2" are false then should behave as today
The text was updated successfully, but these errors were encountered:
Ideally the same super class should be used (so that we're not repeating code), but that's not possible because RestfulController uses @transaction which don't handles multi tenancy.
Instead it should be something like: class ScaffoldedController<T> { def delete() { resource.withTransaction { transactionStatus -> } } }
As GORM 6 has support for multi tenancy, scaffolded controllers for multi tenant domains should take into account the current tenant, which RestfulController (the super class for scaffolded controllers) don't.
ScaffoldingControllerInjector should detect that:
If "1" and "2" are true, then the super class must be something that exposes the same actions as RestfulController but whose actions are tenant id aware, like:
def delete() { Tenants.withCurrent { resource.withTransaction { transactionStatus -> ... } } }
If "1" or "2" are false then should behave as today
The text was updated successfully, but these errors were encountered: