From cf37b81299bbeb3802763db907bd652ff169c766 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 19 Aug 2022 16:52:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E7=94=A8=E6=88=B7=E7=BB=84=E4=B8=8B=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=BC=BA=E9=99=B7=E6=A8=A1=E6=9D=BF=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1015881 --user=宋昌昌 【项目设置】用户有项目a和b缺陷模版的权限,在项目a复制缺陷模版,目标项目列表无项目b https://www.tapd.cn/55049933/s/1228093 --- .../main/java/io/metersphere/service/IssueTemplateService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/service/IssueTemplateService.java b/backend/src/main/java/io/metersphere/service/IssueTemplateService.java index 67ef4c68ed..8183a84b69 100644 --- a/backend/src/main/java/io/metersphere/service/IssueTemplateService.java +++ b/backend/src/main/java/io/metersphere/service/IssueTemplateService.java @@ -289,8 +289,7 @@ public class IssueTemplateService extends TemplateBaseService { while (iterator.hasNext()) { ProjectDTO projectDto = iterator.next(); UserGroupExample example = new UserGroupExample(); - example.createCriteria().andSourceIdEqualTo(projectDto.getId()) - .andUserIdEqualTo(SessionUtils.getUserId()).andGroupIdIn(Arrays.asList(UserGroupConstants.PROJECT_ADMIN, UserGroupConstants.PROJECT_MEMBER)); + example.createCriteria().andSourceIdEqualTo(projectDto.getId()).andUserIdEqualTo(SessionUtils.getUserId()); List userGroups = userGroupMapper.selectByExample(example); List groupPermissions = getPermissionsByUserGroups(userGroups); boolean isShow = false;