perf(X-Pack): 用户个人信息增加 MFA 开关

This commit is contained in:
fit2cloud-chenyw
2024-12-06 12:39:31 +08:00
parent 3141eba804
commit 32f5b5d458
7 changed files with 16 additions and 2 deletions

View File

@@ -94,6 +94,10 @@
<key-type>java.lang.String</key-type>
<value-type>java.util.List</value-type>
</cache>
<cache alias="de_v2_global_mfa" uses-template="common-cache">
<key-type>java.lang.String</key-type>
<value-type>java.lang.Object</value-type>
</cache>
<cache alias="de_v2_user_token_cache">
<key-type>java.lang.String</key-type>

View File

@@ -4152,6 +4152,7 @@ export default {
status_1: '所有用户',
status_2: '仅系统管理员',
platform_tips: '第三方登录方式包括OIDC、CAS',
exp_tips: '单位:秒,目前仅在查看账号密码校验 MFA 时生效'
exp_tips: '单位:秒,目前仅在查看账号密码校验 MFA 时生效',
user_enable: '启用 MFA 多因子认证'
}
}

View File

@@ -37,4 +37,8 @@ public interface PerSettingApi {
@Operation(summary = "保存MFA设置")
@PostMapping("/mfa/save")
void saveMfa(@RequestBody List<PerSettingItemVO> settings);
@Operation(summary = "查询MFA状态")
@GetMapping("/mfaStatus")
Integer mfaStatus();
}

View File

@@ -32,6 +32,7 @@ public class UserCreator implements Serializable {
@Schema(hidden = true)
@JsonIgnore
private Long uid;
private Boolean mfaEnable = false;
@Schema(description = "系统变量")
private List<SysVariableValueItem> variables;
}

View File

@@ -44,6 +44,9 @@ public class UserFormVO implements Serializable {
@Schema(description = "模式")
private String model;
@Schema(description = "MFA状态")
private Boolean mfaEnable = false;
@Schema(description = "系统变量")
private List<SysVariableValueItem> variables;
}

View File

@@ -28,6 +28,7 @@ public class CacheConstant {
public static final String CUSTOM_GEO_CACHE = "de_v2_custom_geo";
public static final String RSA_CACHE = "de_v2_rsa";
public static final String PER_MENU_ID_CACHE = "de_v2_per_menu_id";
public static final String GLOBAL_MFA_CACHE = "de_v2_global_mfa";
}
public static class LicenseCacheConstant {