refactor(系统): 补充内存清理权限

This commit is contained in:
WangXu10 2024-01-30 15:09:03 +08:00 committed by 刘瑞斌
parent e1799abf16
commit bad97e06e4
7 changed files with 19 additions and 1 deletions

View File

@ -33,6 +33,7 @@ INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT
INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'member', 'SYSTEM_PARAMETER_SETTING_BASE:READ');
INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'member', 'SYSTEM_PARAMETER_SETTING_DISPLAY:READ');
INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'member', 'SYSTEM_PARAMETER_SETTING_AUTH:READ');
INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'member', 'SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN:READ');
INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'member', 'SYSTEM_AUTH:READ');
INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'member', 'SYSTEM_LOG:READ');
INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'member', 'SYSTEM_PERSONAL_API_KEY:READ+ADD');

View File

@ -85,6 +85,8 @@ public class PermissionConstants {
public static final String SYSTEM_PARAMETER_SETTING_AUTH_READ_DELETE = "SYSTEM_PARAMETER_SETTING_AUTH:READ+DELETE";
public static final String SYSTEM_PARAMETER_SETTING_DISPLAY_READ = "SYSTEM_PARAMETER_SETTING_DISPLAY:READ";
public static final String SYSTEM_PARAMETER_SETTING_DISPLAY_READ_UPDATE = "SYSTEM_PARAMETER_SETTING_DISPLAY:READ+UPDATE";
public static final String SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN_READ = "SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN:READ";
public static final String SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN_READ_UPDATE = "SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN:READ+UPDATE";
/*------ end: SYSTEM_PARAMETER_SETTING ------*/

View File

@ -240,6 +240,8 @@ permission.system_parameter_setting_auth.read=Auth parameter setting read
permission.system_parameter_setting_auth.add=Auth parameter setting create
permission.system_parameter_setting_auth.update=Auth parameter setting update
permission.system_parameter_setting_auth.delete=Auth parameter setting delete
permission.system_parameter_setting_memory_clean.read=Memory clean parameter setting read
permission.system_parameter_setting_memory_clean.update=Memory clean parameter setting update
permission.organization_user_role.name=User group
permission.organization_member.name=User
permission.service_integration.name=Service Integration

View File

@ -241,6 +241,8 @@ permission.system_parameter_setting_auth.read=认证设置-查询
permission.system_parameter_setting_auth.add=认证设置-创建
permission.system_parameter_setting_auth.update=认证设置-编辑
permission.system_parameter_setting_auth.delete=认证设置-删除
permission.system_parameter_setting_memory_clean.read=内存清理-查询
permission.system_parameter_setting_memory_clean.update=内存清理-编辑
permission.organization_user_role.name=用户组
permission.organization_member.name=用户
permission.service_integration.name=服务集成

View File

@ -240,6 +240,8 @@ permission.system_parameter_setting_auth.read=認證設置-查詢
permission.system_parameter_setting_auth.add=認證設置-創建
permission.system_parameter_setting_auth.update=認證設置-編輯
permission.system_parameter_setting_auth.delete=認證設置-刪除
permission.system_parameter_setting_memory_clean.read=內存清理-查詢
permission.system_parameter_setting_memory_clean.update=內存清理-編輯
permission.organization_user_role.name=用戶組
permission.organization_member.name=用戶
permission.service_integration.name=服務集成

View File

@ -80,6 +80,7 @@ public class SystemParameterController {
@PostMapping("/edit/clean-config")
@Operation(summary = "系统设置-系统-系统参数-内存清理-保存")
@Log(type = OperationLogType.UPDATE, expression = "#msClass.cleanOperationConfigLog(#systemParameter)", msClass = SystemParameterService.class)
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN_READ_UPDATE)
public void editLogConfig(@RequestBody List<SystemParameter> systemParameter) {
systemParameterService.editLogConfig(systemParameter);
}
@ -87,7 +88,7 @@ public class SystemParameterController {
@GetMapping("/get/clean-config")
@Operation(summary = "系统设置-系统-系统参数-基本设置-内存清理-获取")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_BASE_READ)
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN_READ)
public BaseCleanConfigDTO getLogConfigInfo() {
return systemParameterService.getLogConfigInfo();
}

View File

@ -147,6 +147,14 @@
{
"id": "SYSTEM_PARAMETER_SETTING_AUTH:READ+DELETE",
"name": "permission.system_parameter_setting_auth.delete"
},
{
"id": "SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN:READ",
"name": "permission.system_parameter_setting_memory_clean.read"
},
{
"id": "SYSTEM_PARAMETER_SETTING_MEMORY_CLEAN:READ+UPDATE",
"name": "permission.system_parameter_setting_memory_clean.update"
}
]
},