sql: 密码不允许使用最近修改的密码数据参数

This commit is contained in:
TsMask
2025-03-31 18:42:26 +08:00
parent 46b66cda5b
commit a430466ccb
6 changed files with 52 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ INSERT INTO "sys_config" VALUES (7, 'config.sys.helpDoc', 'sys.helpDoc', '/stati
INSERT INTO "sys_config" VALUES (8, 'sys.account.captchaType', 'sys.account.captchaType', 'math', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'sys.account.captchaTypeRemark'); INSERT INTO "sys_config" VALUES (8, 'sys.account.captchaType', 'sys.account.captchaType', 'math', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'sys.account.captchaTypeRemark');
INSERT INTO "sys_config" VALUES (9, 'config.sys.user.passwordPolicy', 'sys.user.passwordPolicy', '{"minLength":8,"specialChars":2,"uppercase":1,"lowercase":1}', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwordPolicyRemark'); INSERT INTO "sys_config" VALUES (9, 'config.sys.user.passwordPolicy', 'sys.user.passwordPolicy', '{"minLength":8,"specialChars":2,"uppercase":1,"lowercase":1}', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwordPolicyRemark');
INSERT INTO "sys_config" VALUES (10, 'config.sys.user.passwdExpire', 'sys.user.passwdExpire', '{"expHours":0,"alertHours":360}', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwdExpireRemark'); INSERT INTO "sys_config" VALUES (10, 'config.sys.user.passwdExpire', 'sys.user.passwdExpire', '{"expHours":0,"alertHours":360}', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwdExpireRemark');
INSERT INTO "sys_config" VALUES (11, 'config.sys.user.passwdNotAllowedHistory', 'sys.user.passwdNotAllowedHistory', '0', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwdNotAllowedHistoryRemark');
INSERT INTO "sys_config" VALUES (21, 'config.monitor.sysResource.storeDays', 'monitor.sysResource.storeDays', '30', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.monitor.sysResource.storeDaysRemark'); INSERT INTO "sys_config" VALUES (21, 'config.monitor.sysResource.storeDays', 'monitor.sysResource.storeDays', '30', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.monitor.sysResource.storeDaysRemark');
INSERT INTO "sys_config" VALUES (22, 'config.sys.logo.type', 'sys.logo.type', 'icon', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.logo.typeRemark'); INSERT INTO "sys_config" VALUES (22, 'config.sys.logo.type', 'sys.logo.type', 'icon', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.logo.typeRemark');
INSERT INTO "sys_config" VALUES (23, 'config.sys.logo.filePathIcon', 'sys.logo.filePathIcon', '/static/logo/{language}_icon.png', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.logo.filePathIconRemark'); INSERT INTO "sys_config" VALUES (23, 'config.sys.logo.filePathIcon', 'sys.logo.filePathIcon', '/static/logo/{language}_icon.png', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.logo.filePathIconRemark');

View File

@@ -732,4 +732,6 @@ expHours为过期时间0表示不启用
alertHours即将到期提醒时间', 'Numerical unit (hours) alertHours即将到期提醒时间', 'Numerical unit (hours)
expHours for the expiration time, 0 means not enabled expHours for the expiration time, 0 means not enabled
alertHours upcoming expiration reminder time'); alertHours upcoming expiration reminder time');
INSERT INTO "sys_i18n" VALUES (674, 'config.sys.user.passwdNotAllowedHistory', '用户管理-不允许使用最近密码次数', 'User Management-Not Allowed Recent Passwords');
INSERT INTO "sys_i18n" VALUES (675, 'config.sys.user.passwdNotAllowedHistoryRemark', '创建新密码不等于之前使用的x次中的密码', 'Creating a new password that is not equal to the previously used password in x times');
INSERT INTO "sys_i18n" VALUES (676, 'login.errPasswdHistory', '不允许使用最近密码', 'Recent passwords not allowed');

View File

@@ -0,0 +1,27 @@
-- ----------------------------
-- Table structure for sys_log_user_password
-- ----------------------------
DROP TABLE IF EXISTS "sys_log_user_password";
CREATE TABLE "sys_log_user_password" (
"id" integer NOT NULL,
"user_id" integer,
"user_name" text(32),
"password" text(128),
"create_by" text(64),
"create_time" integer,
PRIMARY KEY ("id")
);
-- ----------------------------
-- Indexes structure for table sys_log_user_password
-- ----------------------------
CREATE INDEX "idx_id_name_time"
ON "sys_log_user_password" (
"user_id" ASC,
"user_name" ASC,
"create_time" ASC
);
-- ----------------------------
-- Records of sys_log_user_password
-- ----------------------------

View File

@@ -34,6 +34,7 @@ INSERT INTO `sys_config` VALUES (7, 'config.sys.helpDoc', 'sys.helpDoc', '/stati
INSERT INTO `sys_config` VALUES (8, 'sys.account.captchaType', 'sys.account.captchaType', 'math', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'sys.account.captchaTypeRemark'); INSERT INTO `sys_config` VALUES (8, 'sys.account.captchaType', 'sys.account.captchaType', 'math', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'sys.account.captchaTypeRemark');
INSERT INTO `sys_config` VALUES (9, 'config.sys.user.passwordPolicy', 'sys.user.passwordPolicy', '{\"minLength\":8,\"specialChars\":2,\"uppercase\":1,\"lowercase\":1}', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwordPolicyRemark'); INSERT INTO `sys_config` VALUES (9, 'config.sys.user.passwordPolicy', 'sys.user.passwordPolicy', '{\"minLength\":8,\"specialChars\":2,\"uppercase\":1,\"lowercase\":1}', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwordPolicyRemark');
INSERT INTO `sys_config` VALUES (10, 'config.sys.user.passwdExpire', 'sys.user.passwdExpire', '{\"expHours\":0,\"alertHours\":360}', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwdExpireRemark'); INSERT INTO `sys_config` VALUES (10, 'config.sys.user.passwdExpire', 'sys.user.passwdExpire', '{\"expHours\":0,\"alertHours\":360}', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwdExpireRemark');
INSERT INTO `sys_config` VALUES (11, 'config.sys.user.passwdNotAllowedHistory', 'sys.user.passwdNotAllowedHistory', '0', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.user.passwdNotAllowedHistoryRemark');
INSERT INTO `sys_config` VALUES (21, 'config.monitor.sysResource.storeDays', 'monitor.sysResource.storeDays', '30', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.monitor.sysResource.storeDaysRemark'); INSERT INTO `sys_config` VALUES (21, 'config.monitor.sysResource.storeDays', 'monitor.sysResource.storeDays', '30', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.monitor.sysResource.storeDaysRemark');
INSERT INTO `sys_config` VALUES (22, 'config.sys.logo.type', 'sys.logo.type', 'icon', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.logo.typeRemark'); INSERT INTO `sys_config` VALUES (22, 'config.sys.logo.type', 'sys.logo.type', 'icon', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.logo.typeRemark');
INSERT INTO `sys_config` VALUES (23, 'config.sys.logo.filePathIcon', 'sys.logo.filePathIcon', '/static/logo/{language}_icon.png', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.logo.filePathIconRemark'); INSERT INTO `sys_config` VALUES (23, 'config.sys.logo.filePathIcon', 'sys.logo.filePathIcon', '/static/logo/{language}_icon.png', 'Y', '0', 'system', 1704960008300, 'system', 1704960008300, 'config.sys.logo.filePathIconRemark');

View File

@@ -688,5 +688,8 @@ INSERT INTO `sys_i18n` VALUES (670, 'config.sys.user.passwordPolicy', '用户管
INSERT INTO `sys_i18n` VALUES (671, 'config.sys.user.passwordPolicyRemark', 'minLength密码至少8个字符\nspecialChars至少包含2个特殊字符例如!@#$%^&*()\nuppercase至少包含一个大写字母\nlowercase至少包含一个小写字母', 'minLength: password should be at least 8 characters long\nspecialChars: at least 2 special characters (e.g. ! @#$%^&*())\nuppercase: contain at least one uppercase letter\nlowercase: contains at least one lowercase letter'); INSERT INTO `sys_i18n` VALUES (671, 'config.sys.user.passwordPolicyRemark', 'minLength密码至少8个字符\nspecialChars至少包含2个特殊字符例如!@#$%^&*()\nuppercase至少包含一个大写字母\nlowercase至少包含一个小写字母', 'minLength: password should be at least 8 characters long\nspecialChars: at least 2 special characters (e.g. ! @#$%^&*())\nuppercase: contain at least one uppercase letter\nlowercase: contains at least one lowercase letter');
INSERT INTO `sys_i18n` VALUES (672, 'config.sys.user.passwdExpire', '用户管理-密码有效期', 'User Management-Password Expiration Date'); INSERT INTO `sys_i18n` VALUES (672, 'config.sys.user.passwdExpire', '用户管理-密码有效期', 'User Management-Password Expiration Date');
INSERT INTO `sys_i18n` VALUES (673, 'config.sys.user.passwdExpireRemark', '数值单位(小时)\nexpHours为过期时间0表示不启用\nalertHours即将到期提醒时间', 'Numerical unit (hours) \nexpHours for the expiration time, 0 means not enabled \nalertHours upcoming expiration reminder time'); INSERT INTO `sys_i18n` VALUES (673, 'config.sys.user.passwdExpireRemark', '数值单位(小时)\nexpHours为过期时间0表示不启用\nalertHours即将到期提醒时间', 'Numerical unit (hours) \nexpHours for the expiration time, 0 means not enabled \nalertHours upcoming expiration reminder time');
INSERT INTO `sys_i18n` VALUES (674, 'config.sys.user.passwdNotAllowedHistory', '用户管理-不允许使用最近密码次数', 'User Management-Not Allowed Recent Passwords');
INSERT INTO `sys_i18n` VALUES (675, 'config.sys.user.passwdNotAllowedHistoryRemark', '创建新密码不等于之前使用的x次中的密码', 'Creating a new password that is not equal to the previously used password in x times');
INSERT INTO `sys_i18n` VALUES (676, 'login.errPasswdHistory', '不允许使用最近密码', 'Recent passwords not allowed');
-- Dump completed on 2025-02-14 15:26:56 -- Dump completed on 2025-02-14 15:26:56

View File

@@ -0,0 +1,17 @@
--
-- Table structure for table `sys_log_user_password`
--
DROP TABLE IF EXISTS `sys_log_user_password`;
CREATE TABLE `sys_log_user_password` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` bigint DEFAULT '0' COMMENT '用户ID',
`user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户账号',
`password` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '密码',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
`create_time` bigint DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_id_name_time` (`user_id`,`user_name`,`create_time`) USING BTREE COMMENT '用户ID_用户名_创建时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='系统_用户密码变更日志表';
-- Dump completed on 2025-03-31 17:24:56