removed tenant validation from controller
This commit is contained in:
parent
e83d69c40c
commit
d024ba56e8
@ -73,16 +73,6 @@ public class TenantController extends BaseController {
|
||||
try {
|
||||
boolean newTenant = tenant.getId() == null;
|
||||
|
||||
if (!newTenant) {
|
||||
Tenant oldTenant = tenantService.findTenantById(tenant.getTenantId());
|
||||
if (oldTenant.isIsolatedTbCore() != tenant.isIsolatedTbCore()) {
|
||||
throw new ThingsboardException("Field isolatedTbCore from Tenant can't be changed.", ThingsboardErrorCode.BAD_REQUEST_PARAMS);
|
||||
}
|
||||
if (oldTenant.isIsolatedTbRuleEngine() != tenant.isIsolatedTbRuleEngine()) {
|
||||
throw new ThingsboardException("Field isolatedTbRuleEngine from Tenant can't be changed.", ThingsboardErrorCode.BAD_REQUEST_PARAMS);
|
||||
}
|
||||
}
|
||||
|
||||
Operation operation = newTenant ? Operation.CREATE : Operation.WRITE;
|
||||
|
||||
accessControlService.checkPermission(getCurrentUser(), Resource.TENANT, operation,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user