diff --git a/backend/framework/sdk/src/main/resources/i18n/system_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/system_en_US.properties index 1f0b7ff767..e29ac0873a 100644 --- a/backend/framework/sdk/src/main/resources/i18n/system_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/system_en_US.properties @@ -190,6 +190,7 @@ permission.system_parameter_setting_auth.delete=Auth parameter setting delete permission.organization_user_role.name=User group permission.organization_member.name=User permission.service_integration.name=Service Integration +permission.system_auth=Authorization Management diff --git a/backend/framework/sdk/src/main/resources/i18n/system_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/system_zh_CN.properties index 3827d6eae8..9c25f74082 100644 --- a/backend/framework/sdk/src/main/resources/i18n/system_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/system_zh_CN.properties @@ -189,6 +189,8 @@ permission.system_parameter_setting_auth.delete=认证设置-删除 permission.organization_user_role.name=用户组 permission.organization_member.name=用户 permission.service_integration.name=服务集成 +permission.system_auth=授权管理 + diff --git a/backend/framework/sdk/src/main/resources/i18n/system_zh_TW.properties b/backend/framework/sdk/src/main/resources/i18n/system_zh_TW.properties index 6ee7ffe6e9..38c7e0fe85 100644 --- a/backend/framework/sdk/src/main/resources/i18n/system_zh_TW.properties +++ b/backend/framework/sdk/src/main/resources/i18n/system_zh_TW.properties @@ -189,4 +189,5 @@ permission.system_parameter_setting_auth.delete=認證設置-刪除 permission.organization_user_role.name=用戶組 permission.organization_member.name=用戶 permission.service_integration.name=服務集成 +permission.system_auth=授權管理 diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationProjectController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationProjectController.java index 28d4f3615a..8acf0fcdda 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationProjectController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/OrganizationProjectController.java @@ -14,10 +14,10 @@ import io.metersphere.sdk.util.PageUtils; import io.metersphere.sdk.util.Pager; import io.metersphere.sdk.util.SessionUtils; import io.metersphere.system.dto.UserExtend; +import io.metersphere.system.request.OrganizationProjectRequest; import io.metersphere.system.request.ProjectAddMemberBatchRequest; import io.metersphere.system.request.ProjectAddMemberRequest; import io.metersphere.system.request.ProjectMemberRequest; -import io.metersphere.system.request.OrganizationProjectRequest; import io.metersphere.system.service.OrganizationProjectLogService; import io.metersphere.system.service.OrganizationProjectService; import io.metersphere.validation.groups.Created; @@ -29,7 +29,6 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.constraints.NotBlank; import org.apache.commons.lang3.StringUtils; -import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -96,7 +95,7 @@ public class OrganizationProjectController { } @PostMapping("/member-list") - @RequiresPermissions(value = {PermissionConstants.ORGANIZATION_PROJECT_READ, PermissionConstants.SYSTEM_USER_READ}, logical = Logical.OR) + @RequiresPermissions(PermissionConstants.ORGANIZATION_PROJECT_READ) @Operation(summary = "获取项目下成员列表") public Pager> getProjectMember(@Validated @RequestBody ProjectMemberRequest request) { Page page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemProjectController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemProjectController.java index c87d84e3ba..308136eb86 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemProjectController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/SystemProjectController.java @@ -29,7 +29,6 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.validation.constraints.NotBlank; import org.apache.commons.lang3.StringUtils; -import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -95,7 +94,7 @@ public class SystemProjectController { } @PostMapping("/member-list") - @RequiresPermissions(value = {PermissionConstants.SYSTEM_ORGANIZATION_PROJECT_READ, PermissionConstants.SYSTEM_USER_READ}, logical = Logical.OR) + @RequiresPermissions(PermissionConstants.SYSTEM_ORGANIZATION_PROJECT_READ) @Operation(summary = "获取项目下成员列表") public Pager> getProjectMember(@Validated @RequestBody ProjectMemberRequest request) { Page page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), diff --git a/backend/services/system-setting/src/main/resources/permission.json b/backend/services/system-setting/src/main/resources/permission.json index 636c95c04d..1e8fbfdb81 100644 --- a/backend/services/system-setting/src/main/resources/permission.json +++ b/backend/services/system-setting/src/main/resources/permission.json @@ -116,6 +116,18 @@ "name": "permission.system_parameter_setting_auth.delete" } ] + }, + { + "id": "SYSTEM_AUTHORIZATION_MANAGEMENT", + "name": "permission.system_auth", + "permissions": [ + { + "id": "SYSTEM_AUTH:READ" + }, + { + "id": "SYSTEM_AUTH:READ+UPDATE" + } + ] } ] }, @@ -177,6 +189,28 @@ "id": "SYSTEM_SERVICE_INTEGRATION:READ+DELETE" } ] + }, + { + "id": "ORGANIZATION_PROJECT", + "name": "permission.project.name", + "permissions": [ + { + "id": "ORGANIZATION_PROJECT:READ" + }, + { + "id": "ORGANIZATION_PROJECT:READ+ADD" + }, + { + "id": "ORGANIZATION_PROJECT:READ+UPDATE" + }, + { + "id": "ORGANIZATION_PROJECT:READ+DELETE" + }, + { + "id": "ORGANIZATION_PROJECT:READ+RECOVER" + } + ] + } ] }