You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "fuweng11 (via GitHub)" <gi...@apache.org> on 2023/05/29 07:04:59 UTC

[GitHub] [inlong] fuweng11 commented on a diff in pull request #8109: [INLONG-8108][Manager] WorkflowApprover API Permissions Optimization

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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org