...
|
...
|
@@ -21,8 +21,6 @@ import org.thingsboard.server.common.data.id.UserId; |
21
|
21
|
import org.thingsboard.server.common.data.plugin.ComponentLifecycleEvent;
|
22
|
22
|
import org.thingsboard.server.common.data.yunteng.common.DeleteGroup;
|
23
|
23
|
import org.thingsboard.server.common.data.yunteng.common.UpdateGroup;
|
24
|
|
-import org.thingsboard.server.common.data.yunteng.core.exception.TkDataValidationException;
|
25
|
|
-import org.thingsboard.server.common.data.yunteng.core.message.ErrorMessage;
|
26
|
24
|
import org.thingsboard.server.common.data.yunteng.dto.DeleteDTO;
|
27
|
25
|
import org.thingsboard.server.common.data.yunteng.dto.MenuDTO;
|
28
|
26
|
import org.thingsboard.server.common.data.yunteng.dto.TenantDTO;
|
...
|
...
|
@@ -192,20 +190,20 @@ public class TkAdminController extends BaseController { |
192
|
190
|
@RequestParam(value = "needButton", required = false, defaultValue = "true")
|
193
|
191
|
boolean needButton)
|
194
|
192
|
throws ThingsboardException {
|
|
193
|
+ boolean isSysAdminOrPtAdmin = getCurrentUser().isPtSysadmin() || getCurrentUser().isPtAdmin();
|
195
|
194
|
return ResponseEntity.ok(
|
196
|
195
|
menuService.getMyMenus(
|
197
|
196
|
getCurrentUser().getCurrentTenantId(),
|
198
|
197
|
getCurrentUser().getCurrentUserId(),
|
199
|
|
- getCurrentUser().isPtSysadmin(),
|
|
198
|
+ isSysAdminOrPtAdmin,
|
200
|
199
|
getCurrentUser().isPtTenantAdmin(),
|
201
|
200
|
needButton));
|
202
|
201
|
}
|
203
|
202
|
|
204
|
203
|
@PutMapping("/menu/assign/{tenantId}")
|
205
|
204
|
public void assignMenuToTenant(
|
206
|
|
- @RequestBody String[] menuIds, @PathVariable("tenantId") String tenantId)
|
207
|
|
- throws ThingsboardException {
|
208
|
|
- menuService.assignMenuToTenant(getCurrentUser().getCurrentTenantId(), menuIds);
|
|
205
|
+ @RequestBody String[] menuIds, @PathVariable("tenantId") String tenantId){
|
|
206
|
+ menuService.assignMenuToTenant(tenantId, menuIds);
|
209
|
207
|
}
|
210
|
208
|
|
211
|
209
|
@PostMapping("tenant/updateOrCreateTenant")
|
...
|
...
|
|