From d7b9c1b18d2bdfbc278ff069b9e836a5315a48c0 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Fri, 12 Nov 2021 15:38:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=5F=E3=80=90=E9=A1=B9=E7=9B=AE=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E3=80=91-=E9=A1=B9=E7=9B=AE=E6=88=90=E5=91=98?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=99=BB=E5=BD=95=E7=B3=BB=E7=BB=9F=E5=90=8E?= =?UTF-8?q?=E6=97=A0=E2=80=9D=E7=94=A8=E6=88=B7=E7=BB=84=E5=92=8C=E6=9D=83?= =?UTF-8?q?=E9=99=90=E2=80=9C=E9=A1=B5=E7=AD=BE=20--bug=3D1007853=20--user?= =?UTF-8?q?=3D=E7=8E=8B=E5=AD=9D=E5=88=9A=20=E3=80=90=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E3=80=91-=E9=A1=B9=E7=9B=AE=E6=88=90?= =?UTF-8?q?=E5=91=98=E6=9D=83=E9=99=90=E7=99=BB=E5=BD=95=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=90=8E=E6=97=A0=E2=80=9D=E7=94=A8=E6=88=B7=E7=BB=84=E5=92=8C?= =?UTF-8?q?=E6=9D=83=E9=99=90=E2=80=9C=E9=A1=B5=E7=AD=BE=20https://www.tap?= =?UTF-8?q?d.cn/55049933/s/1066757?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constants/PermissionConstants.java | 5 ++++ backend/src/main/resources/permission.json | 24 +++++++++++++++++++ .../project/head/ProjectHeaderMenus.vue | 2 +- .../components/project/home/ProjectHome.vue | 4 ++-- .../components/project/menu/UserGroup.vue | 2 +- 5 files changed, 33 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/commons/constants/PermissionConstants.java b/backend/src/main/java/io/metersphere/commons/constants/PermissionConstants.java index 477e320dff..924f8f03f9 100644 --- a/backend/src/main/java/io/metersphere/commons/constants/PermissionConstants.java +++ b/backend/src/main/java/io/metersphere/commons/constants/PermissionConstants.java @@ -80,6 +80,11 @@ public class PermissionConstants { public static final String PROJECT_MANAGER_READ_EDIT = "PROJECT_MANAGER:READ+EDIT"; public static final String PROJECT_MANAGER_READ_DELETE = "PROJECT_MANAGER:READ+DELETE"; + public static final String PROJECT_GROUP_READ = "PROJECT_GROUP:READ"; + public static final String PROJECT_GROUP_READ_CREATE = "PROJECT_GROUP:READ+CREATE"; + public static final String PROJECT_GROUP_READ_EDIT = "PROJECT_GROUP:READ+EDIT"; + public static final String PROJECT_GROUP_READ_DELETE = "PROJECT_GROUP:READ+DELETE"; + public static final String PROJECT_ENVIRONMENT_READ = "PROJECT_ENVIRONMENT:READ"; public static final String PROJECT_ENVIRONMENT_READ_CREATE = "PROJECT_ENVIRONMENT:READ+CREATE"; public static final String PROJECT_ENVIRONMENT_READ_EDIT = "PROJECT_ENVIRONMENT:READ+EDIT"; diff --git a/backend/src/main/resources/permission.json b/backend/src/main/resources/permission.json index 007d28b0bf..07add6f990 100644 --- a/backend/src/main/resources/permission.json +++ b/backend/src/main/resources/permission.json @@ -285,6 +285,26 @@ "name": "移除成员", "resourceId": "PROJECT_USER" }, + { + "id": "PROJECT_GROUP:READ", + "name": "查询用户组与权限", + "resourceId": "PROJECT_GROUP" + }, + { + "id": "PROJECT_GROUP:READ+CREATE", + "name": "创建用户组与权限", + "resourceId": "PROJECT_GROUP" + }, + { + "id": "PROJECT_GROUP:READ+EDIT", + "name": "编辑用户组与权限", + "resourceId": "PROJECT_GROUP" + }, + { + "id": "PROJECT_GROUP:READ+DELETE", + "name": "删除用户组与权限", + "resourceId": "PROJECT_GROUP" + }, { "id": "PROJECT_MANAGER:READ", "name": "查询项目", @@ -869,6 +889,10 @@ "id": "PROJECT_MANAGER", "name": "项目管理" }, + { + "id": "PROJECT_GROUP", + "name": "用户组与权限" + }, { "id": "PROJECT_ENVIRONMENT", "name": "环境设置" diff --git a/frontend/src/business/components/project/head/ProjectHeaderMenus.vue b/frontend/src/business/components/project/head/ProjectHeaderMenus.vue index e42105f06f..d0d8e813b4 100644 --- a/frontend/src/business/components/project/head/ProjectHeaderMenus.vue +++ b/frontend/src/business/components/project/head/ProjectHeaderMenus.vue @@ -11,7 +11,7 @@ {{ $t('project.member') }} - + {{ $t('project.group_permission') }}
+ @click="click('/project/usergroup', ['PROJECT_GROUP:READ'])">
- + {{ $t('group.group_permission') }}
{{ $t('project.group_desc') }} diff --git a/frontend/src/business/components/project/menu/UserGroup.vue b/frontend/src/business/components/project/menu/UserGroup.vue index 0a9856c581..7c946849af 100644 --- a/frontend/src/business/components/project/menu/UserGroup.vue +++ b/frontend/src/business/components/project/menu/UserGroup.vue @@ -2,7 +2,7 @@