From 18492ec568b4097ab98793b51515192737f000ee Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 10 May 2021 10:03:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=AA=E8=AF=BB=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E7=94=A8=E4=BE=8B=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B7=B3=E8=BD=AC=E5=88=B0=E9=BB=98=E8=AE=A4=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/controller/TestCaseTemplateController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/io/metersphere/controller/TestCaseTemplateController.java b/backend/src/main/java/io/metersphere/controller/TestCaseTemplateController.java index db6b84a414..122efac3fb 100644 --- a/backend/src/main/java/io/metersphere/controller/TestCaseTemplateController.java +++ b/backend/src/main/java/io/metersphere/controller/TestCaseTemplateController.java @@ -32,6 +32,7 @@ public class TestCaseTemplateController { } @PostMapping("/list/{goPage}/{pageSize}") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER, RoleConstants.TEST_VIEWER}, logical = Logical.OR) public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody BaseQueryRequest request) { Page> page = PageHelper.startPage(goPage, pageSize, true); return PageUtils.setPageInfo(page, testCaseTemplateService.list(request)); @@ -48,11 +49,13 @@ public class TestCaseTemplateController { } @GetMapping("/option/{workspaceId}") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER, RoleConstants.TEST_VIEWER}, logical = Logical.OR) public List list(@PathVariable String workspaceId) { return testCaseTemplateService.getOption(workspaceId); } @GetMapping("/get/relate/{projectId}") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER, RoleConstants.TEST_VIEWER}, logical = Logical.OR) public TestCaseTemplateDao getTemplate(@PathVariable String projectId) { return testCaseTemplateService.getTemplate(projectId); }