refactor(系统设置): 增加权限的国际化
This commit is contained in:
parent
324f8b600d
commit
2bda39e252
|
@ -190,6 +190,7 @@ permission.system_parameter_setting_auth.delete=Auth parameter setting delete
|
||||||
permission.organization_user_role.name=User group
|
permission.organization_user_role.name=User group
|
||||||
permission.organization_member.name=User
|
permission.organization_member.name=User
|
||||||
permission.service_integration.name=Service Integration
|
permission.service_integration.name=Service Integration
|
||||||
|
permission.system_auth=Authorization Management
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,8 @@ permission.system_parameter_setting_auth.delete=认证设置-删除
|
||||||
permission.organization_user_role.name=用户组
|
permission.organization_user_role.name=用户组
|
||||||
permission.organization_member.name=用户
|
permission.organization_member.name=用户
|
||||||
permission.service_integration.name=服务集成
|
permission.service_integration.name=服务集成
|
||||||
|
permission.system_auth=授权管理
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -189,4 +189,5 @@ permission.system_parameter_setting_auth.delete=認證設置-刪除
|
||||||
permission.organization_user_role.name=用戶組
|
permission.organization_user_role.name=用戶組
|
||||||
permission.organization_member.name=用戶
|
permission.organization_member.name=用戶
|
||||||
permission.service_integration.name=服務集成
|
permission.service_integration.name=服務集成
|
||||||
|
permission.system_auth=授權管理
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,10 @@ import io.metersphere.sdk.util.PageUtils;
|
||||||
import io.metersphere.sdk.util.Pager;
|
import io.metersphere.sdk.util.Pager;
|
||||||
import io.metersphere.sdk.util.SessionUtils;
|
import io.metersphere.sdk.util.SessionUtils;
|
||||||
import io.metersphere.system.dto.UserExtend;
|
import io.metersphere.system.dto.UserExtend;
|
||||||
|
import io.metersphere.system.request.OrganizationProjectRequest;
|
||||||
import io.metersphere.system.request.ProjectAddMemberBatchRequest;
|
import io.metersphere.system.request.ProjectAddMemberBatchRequest;
|
||||||
import io.metersphere.system.request.ProjectAddMemberRequest;
|
import io.metersphere.system.request.ProjectAddMemberRequest;
|
||||||
import io.metersphere.system.request.ProjectMemberRequest;
|
import io.metersphere.system.request.ProjectMemberRequest;
|
||||||
import io.metersphere.system.request.OrganizationProjectRequest;
|
|
||||||
import io.metersphere.system.service.OrganizationProjectLogService;
|
import io.metersphere.system.service.OrganizationProjectLogService;
|
||||||
import io.metersphere.system.service.OrganizationProjectService;
|
import io.metersphere.system.service.OrganizationProjectService;
|
||||||
import io.metersphere.validation.groups.Created;
|
import io.metersphere.validation.groups.Created;
|
||||||
|
@ -29,7 +29,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -96,7 +95,7 @@ public class OrganizationProjectController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/member-list")
|
@PostMapping("/member-list")
|
||||||
@RequiresPermissions(value = {PermissionConstants.ORGANIZATION_PROJECT_READ, PermissionConstants.SYSTEM_USER_READ}, logical = Logical.OR)
|
@RequiresPermissions(PermissionConstants.ORGANIZATION_PROJECT_READ)
|
||||||
@Operation(summary = "获取项目下成员列表")
|
@Operation(summary = "获取项目下成员列表")
|
||||||
public Pager<List<UserExtend>> getProjectMember(@Validated @RequestBody ProjectMemberRequest request) {
|
public Pager<List<UserExtend>> getProjectMember(@Validated @RequestBody ProjectMemberRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
|
|
|
@ -29,7 +29,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -95,7 +94,7 @@ public class SystemProjectController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/member-list")
|
@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 = "获取项目下成员列表")
|
@Operation(summary = "获取项目下成员列表")
|
||||||
public Pager<List<UserExtend>> getProjectMember(@Validated @RequestBody ProjectMemberRequest request) {
|
public Pager<List<UserExtend>> getProjectMember(@Validated @RequestBody ProjectMemberRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
|
|
|
@ -116,6 +116,18 @@
|
||||||
"name": "permission.system_parameter_setting_auth.delete"
|
"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": "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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue