Commit d024ba56e89fad42842a5c9b9aafacb865d6466e

Authored by YevhenBondarenko
Committed by Andrew Shvayka
1 parent e83d69c4

removed tenant validation from controller

... ... @@ -73,16 +73,6 @@ public class TenantController extends BaseController {
73 73 try {
74 74 boolean newTenant = tenant.getId() == null;
75 75
76   - if (!newTenant) {
77   - Tenant oldTenant = tenantService.findTenantById(tenant.getTenantId());
78   - if (oldTenant.isIsolatedTbCore() != tenant.isIsolatedTbCore()) {
79   - throw new ThingsboardException("Field isolatedTbCore from Tenant can't be changed.", ThingsboardErrorCode.BAD_REQUEST_PARAMS);
80   - }
81   - if (oldTenant.isIsolatedTbRuleEngine() != tenant.isIsolatedTbRuleEngine()) {
82   - throw new ThingsboardException("Field isolatedTbRuleEngine from Tenant can't be changed.", ThingsboardErrorCode.BAD_REQUEST_PARAMS);
83   - }
84   - }
85   -
86 76 Operation operation = newTenant ? Operation.CREATE : Operation.WRITE;
87 77
88 78 accessControlService.checkPermission(getCurrentUser(), Resource.TENANT, operation,
... ...