fuweng11 commented on code in PR #8109:
URL: https://github.com/apache/inlong/pull/8109#discussion_r1208988031
##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/WorkflowApproverController.java:
##########
@@ -54,19 +56,22 @@ public class WorkflowApproverController {
@PostMapping("/workflow/approver/save")
@OperationLog(operation = OperationType.CREATE)
@ApiOperation(value = "Save approver info")
+ @RequiresRoles(value = UserRoleCode.ADMIN)
public Response<Integer> save(@RequestBody ApproverRequest config) {
return Response.success(workflowApproverService.save(config,
LoginUserUtils.getLoginUser().getName()));
}
@GetMapping(value = "/workflow/approver/get/{id}")
@ApiOperation(value = "Get approver by ID")
@ApiImplicitParam(name = "id", value = "Workflow approver ID",
dataTypeClass = Integer.class, required = true)
+ @RequiresRoles(value = UserRoleCode.ADMIN)
public Response<ApproverResponse> get(@PathVariable Integer id) {
return Response.success(workflowApproverService.get(id));
}
@GetMapping("/workflow/approver/list")
@ApiOperation(value = "List workflow approvers")
+ @RequiresRoles(value = UserRoleCode.ADMIN)
Review Comment:
The admin check of the `/workflow/approver/list` interface cannot be added
here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]