Commit b8ebdb7f40ed384bf55106f39faf1272e970957e

Authored by 云中非
1 parent 6a67f776

refactor: 组态内容和节点的管理不需要权限验证

... ... @@ -27,7 +27,6 @@ public class YtConfigurationContentController extends BaseController {
27 27
28 28 @PostMapping
29 29 @ApiOperation("新增")
30   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:content:post'})")
31 30 public ResponseEntity<ConfigurationContentDTO> save(
32 31 @Validated({AddGroup.class}) @RequestBody ConfigurationContentDTO configurationContentDTO)
33 32 throws ThingsboardException {
... ... @@ -38,7 +37,6 @@ public class YtConfigurationContentController extends BaseController {
38 37
39 38 @PutMapping
40 39 @ApiOperation("修改")
41   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:content:update'})")
42 40 public ResponseEntity<ConfigurationContentInfoDTO> update(
43 41 @Validated({UpdateGroup.class}) @RequestBody ConfigurationContentInfoDTO contentReqDTO)
44 42 throws ThingsboardException {
... ... @@ -53,7 +51,6 @@ public class YtConfigurationContentController extends BaseController {
53 51
54 52 @DeleteMapping
55 53 @ApiOperation("删除")
56   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:content:delete'})")
57 54 public ResponseEntity<Boolean> delete(
58 55 @Validated({DeleteGroup.class}) @RequestBody DeleteDTO deleteDTO)
59 56 throws ThingsboardException {
... ...
... ... @@ -35,7 +35,6 @@ public class YtConfigurationNodeController extends BaseController {
35 35
36 36 @PostMapping
37 37 @ApiOperation("保存节点数据源并刷新节点的交互和动效信息")
38   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:post'})")
39 38 public ResponseEntity<ConfigurationNodeStateDTO> saveNode(
40 39 @Validated({AddGroup.class}) @RequestBody ConfigurationNodeStateDTO nodeDTO)
41 40 throws ThingsboardException {
... ... @@ -74,7 +73,6 @@ public class YtConfigurationNodeController extends BaseController {
74 73
75 74 @PostMapping("datasource")
76 75 @ApiOperation("编辑数据源")
77   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:datasource:post'})")
78 76 public ResponseEntity<ConfigurationDatasourceDTO> saveDatasource(
79 77 @Validated({AddGroup.class}) @RequestBody ConfigurationDatasourceDTO datasourceDTO)
80 78 throws ThingsboardException {
... ... @@ -85,7 +83,6 @@ public class YtConfigurationNodeController extends BaseController {
85 83
86 84 @PostMapping("event")
87 85 @ApiOperation("编辑数据交互")
88   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:event:post'})")
89 86 public ResponseEntity<ConfigurationEventDTO> saveEvent(
90 87 @Validated({AddGroup.class}) @RequestBody ConfigurationEventDTO eventDTO)
91 88 throws ThingsboardException {
... ... @@ -96,7 +93,6 @@ public class YtConfigurationNodeController extends BaseController {
96 93
97 94 @PostMapping("act")
98 95 @ApiOperation("编辑动画效果")
99   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:act:post'})")
100 96 public ResponseEntity<ConfigurationActDTO> saveAct(
101 97 @Validated({AddGroup.class}) @RequestBody ConfigurationActDTO actDTO)
102 98 throws ThingsboardException {
... ... @@ -108,7 +104,6 @@ public class YtConfigurationNodeController extends BaseController {
108 104
109 105 @DeleteMapping("datasource")
110 106 @ApiOperation("删除数据源")
111   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:datasource:delete'})")
112 107 public ResponseEntity<Boolean> deleteDatasource(@RequestBody ConfigurationDatasourceDTO deleteDTO)
113 108 throws ThingsboardException {
114 109 deleteDTO.setTenantId(getCurrentUser().getCurrentTenantId());
... ... @@ -117,7 +112,6 @@ public class YtConfigurationNodeController extends BaseController {
117 112
118 113 @DeleteMapping("event")
119 114 @ApiOperation("删除数据交互")
120   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:event:delete'})")
121 115 public ResponseEntity<Boolean> deleteEvent( @RequestBody ConfigurationEventDTO deleteDTO)
122 116 throws ThingsboardException {
123 117 deleteDTO.setTenantId(getCurrentUser().getCurrentTenantId());
... ... @@ -125,7 +119,6 @@ public class YtConfigurationNodeController extends BaseController {
125 119 }
126 120 @DeleteMapping("act")
127 121 @ApiOperation("删除动画效果")
128   - @PreAuthorize("@check.checkPermissions({},{'api:yt:configuration:node:act:delete'})")
129 122 public ResponseEntity<Boolean> deleteAct( @RequestBody ConfigurationActDTO deleteDTO)
130 123 throws ThingsboardException {
131 124 deleteDTO.setTenantId(getCurrentUser().getCurrentTenantId());
... ...