refactor(系统设置): 日志权限调整
This commit is contained in:
parent
62c3502848
commit
e02e799fc5
|
@ -105,7 +105,7 @@ public class PermissionConstants {
|
||||||
public static final String SYSTEM_AUTH_READ = "SYSTEM_AUTH:READ";
|
public static final String SYSTEM_AUTH_READ = "SYSTEM_AUTH:READ";
|
||||||
public static final String SYSTEM_AUTH_READ_UPDATE = "SYSTEM_AUTH:READ+UPDATE";
|
public static final String SYSTEM_AUTH_READ_UPDATE = "SYSTEM_AUTH:READ+UPDATE";
|
||||||
|
|
||||||
public static final String SYSTEM_OPERATING_LOG_READ = "SYSTEM_OPERATING_LOG:READ";
|
public static final String SYSTEM_LOG_READ = "SYSTEM_LOG:READ";
|
||||||
|
|
||||||
public static final String ORGANIZATION_SERVICE_READ = "ORGANIZATION_SERVICE:READ";
|
public static final String ORGANIZATION_SERVICE_READ = "ORGANIZATION_SERVICE:READ";
|
||||||
public static final String ORGANIZATION_SERVICE_READ_UPDATE = "ORGANIZATION_SERVICE:READ+UPDATE";
|
public static final String ORGANIZATION_SERVICE_READ_UPDATE = "ORGANIZATION_SERVICE:READ+UPDATE";
|
||||||
|
@ -123,7 +123,7 @@ public class PermissionConstants {
|
||||||
public static final String ORGANIZATION_PROJECT_ENVIRONMENT_READ_IMPORT = "ORGANIZATION_PROJECT_ENVIRONMENT:READ+IMPORT";
|
public static final String ORGANIZATION_PROJECT_ENVIRONMENT_READ_IMPORT = "ORGANIZATION_PROJECT_ENVIRONMENT:READ+IMPORT";
|
||||||
public static final String ORGANIZATION_PROJECT_ENVIRONMENT_READ_EXPORT = "ORGANIZATION_PROJECT_ENVIRONMENT:READ+EXPORT";
|
public static final String ORGANIZATION_PROJECT_ENVIRONMENT_READ_EXPORT = "ORGANIZATION_PROJECT_ENVIRONMENT:READ+EXPORT";
|
||||||
|
|
||||||
public static final String ORGANIZATION_OPERATING_LOG_READ = "ORGANIZATION_OPERATING_LOG:READ";
|
public static final String ORGANIZATION_LOG_READ = "ORGANIZATION_LOG:READ";
|
||||||
|
|
||||||
public static final String PROJECT_USER_READ = "PROJECT_USER:READ";
|
public static final String PROJECT_USER_READ = "PROJECT_USER:READ";
|
||||||
public static final String PROJECT_USER_READ_ADD = "PROJECT_USER:READ+ADD";
|
public static final String PROJECT_USER_READ_ADD = "PROJECT_USER:READ+ADD";
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class OperationLogController {
|
||||||
|
|
||||||
@GetMapping("/get/options")
|
@GetMapping("/get/options")
|
||||||
@Operation(summary = "获取组织/项目级联下拉框选项")
|
@Operation(summary = "获取组织/项目级联下拉框选项")
|
||||||
@RequiresPermissions(PermissionConstants.SYSTEM_OPERATING_LOG_READ)
|
@RequiresPermissions(PermissionConstants.SYSTEM_LOG_READ)
|
||||||
public OrganizationProjectOptionsResponse getOptions() {
|
public OrganizationProjectOptionsResponse getOptions() {
|
||||||
|
|
||||||
//获取全部组织
|
//获取全部组织
|
||||||
|
@ -63,7 +63,7 @@ public class OperationLogController {
|
||||||
|
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@Operation(summary = "系统操作日志列表查询")
|
@Operation(summary = "系统操作日志列表查询")
|
||||||
@RequiresPermissions(PermissionConstants.SYSTEM_OPERATING_LOG_READ)
|
@RequiresPermissions(PermissionConstants.SYSTEM_LOG_READ)
|
||||||
public Pager<List<OperationLogResponse>> list(@Validated @RequestBody OperationLogRequest request) {
|
public Pager<List<OperationLogResponse>> list(@Validated @RequestBody OperationLogRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "create_time desc");
|
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "create_time desc");
|
||||||
|
@ -73,7 +73,7 @@ public class OperationLogController {
|
||||||
|
|
||||||
@GetMapping("/user/list")
|
@GetMapping("/user/list")
|
||||||
@Operation(summary = "系统日志页面,获取用户列表")
|
@Operation(summary = "系统日志页面,获取用户列表")
|
||||||
@RequiresPermissions(PermissionConstants.SYSTEM_OPERATING_LOG_READ)
|
@RequiresPermissions(PermissionConstants.SYSTEM_LOG_READ)
|
||||||
public List<User> getUserList() {
|
public List<User> getUserList() {
|
||||||
List<User> userList = userService.getUserList();
|
List<User> userList = userService.getUserList();
|
||||||
return userList;
|
return userList;
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class OrganizationLogController {
|
||||||
|
|
||||||
@GetMapping("/get/options/{organizationId}")
|
@GetMapping("/get/options/{organizationId}")
|
||||||
@Operation(summary = "组织日志-获取项目级联下拉框选项")
|
@Operation(summary = "组织日志-获取项目级联下拉框选项")
|
||||||
@RequiresPermissions(PermissionConstants.ORGANIZATION_OPERATING_LOG_READ)
|
@RequiresPermissions(PermissionConstants.ORGANIZATION_LOG_READ)
|
||||||
public OrganizationProjectOptionsResponse getOrganizationOptions(@PathVariable(value = "organizationId") String organizationId) {
|
public OrganizationProjectOptionsResponse getOrganizationOptions(@PathVariable(value = "organizationId") String organizationId) {
|
||||||
//获取全部项目
|
//获取全部项目
|
||||||
List<OrganizationProjectOptionsDTO> projectList = systemProjectService.getProjectOptions(organizationId);
|
List<OrganizationProjectOptionsDTO> projectList = systemProjectService.getProjectOptions(organizationId);
|
||||||
|
@ -61,7 +61,7 @@ public class OrganizationLogController {
|
||||||
|
|
||||||
@GetMapping("/user/list/{organizationId}")
|
@GetMapping("/user/list/{organizationId}")
|
||||||
@Operation(summary = "组织日志-获取用户列表")
|
@Operation(summary = "组织日志-获取用户列表")
|
||||||
@RequiresPermissions(PermissionConstants.ORGANIZATION_OPERATING_LOG_READ)
|
@RequiresPermissions(PermissionConstants.ORGANIZATION_LOG_READ)
|
||||||
public List<User> getLogUserList(@PathVariable(value = "organizationId") String organizationId) {
|
public List<User> getLogUserList(@PathVariable(value = "organizationId") String organizationId) {
|
||||||
return userService.getUserListByOrgId(organizationId);
|
return userService.getUserListByOrgId(organizationId);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ public class OrganizationLogController {
|
||||||
|
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@Operation(summary = "组织菜单下操作日志列表查询")
|
@Operation(summary = "组织菜单下操作日志列表查询")
|
||||||
@RequiresPermissions(PermissionConstants.ORGANIZATION_OPERATING_LOG_READ)
|
@RequiresPermissions(PermissionConstants.ORGANIZATION_LOG_READ)
|
||||||
public Pager<List<OperationLogResponse>> organizationLogList(@Validated @RequestBody OperationLogRequest request) {
|
public Pager<List<OperationLogResponse>> organizationLogList(@Validated @RequestBody OperationLogRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "create_time desc");
|
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "create_time desc");
|
||||||
|
|
|
@ -138,11 +138,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "SYSTEM_OPERATION_LOG",
|
"id": "SYSTEM_LOG",
|
||||||
"name": "permission.system_operation_log.name",
|
"name": "permission.system_operation_log.name",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"id": "SYSTEM_OPERATING_LOG:READ"
|
"id": "SYSTEM_LOG:READ"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -238,11 +238,11 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "ORGANIZATION_OPERATION_LOG",
|
"id": "ORGANIZATION_LOG",
|
||||||
"name": "permission.organization_operation_log.name",
|
"name": "permission.organization_operation_log.name",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"id": "ORGANIZATION_OPERATING_LOG:READ"
|
"id": "ORGANIZATION_LOG:READ"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class OperationLogControllerTests extends BaseTest {
|
||||||
// @@异常参数校验
|
// @@异常参数校验
|
||||||
updatedGroupParamValidateTest(OperationLogRequestDefinition.class, OPERATION_LOG_LIST);
|
updatedGroupParamValidateTest(OperationLogRequestDefinition.class, OPERATION_LOG_LIST);
|
||||||
// @@校验权限
|
// @@校验权限
|
||||||
requestPostPermissionTest(PermissionConstants.SYSTEM_OPERATING_LOG_READ, OPERATION_LOG_LIST, request);
|
requestPostPermissionTest(PermissionConstants.SYSTEM_LOG_READ, OPERATION_LOG_LIST, request);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ public class OperationLogControllerTests extends BaseTest {
|
||||||
// @@异常参数校验
|
// @@异常参数校验
|
||||||
updatedGroupParamValidateTest(OperationLogRequestDefinition.class, OPERATION_LOG_LIST);
|
updatedGroupParamValidateTest(OperationLogRequestDefinition.class, OPERATION_LOG_LIST);
|
||||||
// @@校验权限
|
// @@校验权限
|
||||||
requestPostPermissionTest(PermissionConstants.SYSTEM_OPERATING_LOG_READ, OPERATION_LOG_LIST, request);
|
requestPostPermissionTest(PermissionConstants.SYSTEM_LOG_READ, OPERATION_LOG_LIST, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ public class OperationLogControllerTests extends BaseTest {
|
||||||
// @@异常参数校验
|
// @@异常参数校验
|
||||||
updatedGroupParamValidateTest(OperationLogRequestDefinition.class, OPERATION_LOG_LIST);
|
updatedGroupParamValidateTest(OperationLogRequestDefinition.class, OPERATION_LOG_LIST);
|
||||||
// @@校验权限
|
// @@校验权限
|
||||||
requestPostPermissionTest(PermissionConstants.SYSTEM_OPERATING_LOG_READ, OPERATION_LOG_LIST, request);
|
requestPostPermissionTest(PermissionConstants.SYSTEM_LOG_READ, OPERATION_LOG_LIST, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ public class OperationLogControllerTests extends BaseTest {
|
||||||
this.requestGetWithOkAndReturn(OPTIONS_LIST);
|
this.requestGetWithOkAndReturn(OPTIONS_LIST);
|
||||||
|
|
||||||
// @@校验权限
|
// @@校验权限
|
||||||
requestGetPermissionTest(PermissionConstants.SYSTEM_OPERATING_LOG_READ, OPTIONS_LIST);
|
requestGetPermissionTest(PermissionConstants.SYSTEM_LOG_READ, OPTIONS_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -141,7 +141,7 @@ public class OperationLogControllerTests extends BaseTest {
|
||||||
this.requestGetWithOkAndReturn(USER_LIST);
|
this.requestGetWithOkAndReturn(USER_LIST);
|
||||||
|
|
||||||
// @@校验权限
|
// @@校验权限
|
||||||
requestGetPermissionTest(PermissionConstants.SYSTEM_OPERATING_LOG_READ, USER_LIST);
|
requestGetPermissionTest(PermissionConstants.SYSTEM_LOG_READ, USER_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class OrganizationLogControllerTests extends BaseTest {
|
||||||
// @@异常参数校验
|
// @@异常参数校验
|
||||||
updatedGroupParamValidateTest(OperationLogRequestDefinition.class, ORGANIZATION_LOG_LIST);
|
updatedGroupParamValidateTest(OperationLogRequestDefinition.class, ORGANIZATION_LOG_LIST);
|
||||||
|
|
||||||
requestPostPermissionTest(PermissionConstants.ORGANIZATION_OPERATING_LOG_READ, ORGANIZATION_LOG_LIST, request);
|
requestPostPermissionTest(PermissionConstants.ORGANIZATION_LOG_READ, ORGANIZATION_LOG_LIST, request);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue