用户密码支持自定义配置规则

master
RuoYi 5 years ago committed by Limy
parent a69c08554d
commit c9167fa3e8

@ -221,7 +221,7 @@
}); });
function submitHandler() { function submitHandler() {
var chrtype = [[${@config.getKey('sys.account.chrtype')}]]; var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
var password = $("#password").val(); var password = $("#password").val();
if ($.validate.form() && checkpwd(chrtype, password)) { if ($.validate.form() && checkpwd(chrtype, password)) {
var data = $("#form-user-add").serializeArray(); var data = $("#form-user-add").serializeArray();

@ -283,7 +283,7 @@
}); });
function submitChangPassword () { function submitChangPassword () {
var chrtype = [[${@config.getKey('sys.account.chrtype')}]]; var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
var password = $("#newPassword").val(); var password = $("#newPassword").val();
if ($.validate.form("form-user-resetPwd") && checkpwd(chrtype, password)) { if ($.validate.form("form-user-resetPwd") && checkpwd(chrtype, password)) {
$.operate.saveModal(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize()); $.operate.saveModal(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());

@ -82,7 +82,7 @@
}); });
function submitHandler() { function submitHandler() {
var chrtype = [[${@config.getKey('sys.account.chrtype')}]]; var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
var password = $("#newPassword").val(); var password = $("#newPassword").val();
if ($.validate.form() && checkpwd(chrtype, password)) { if ($.validate.form() && checkpwd(chrtype, password)) {
$.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize()); $.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());

@ -535,7 +535,7 @@ insert into sys_config values(1, '主框架页-默认皮肤样式名称', 's
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '初始化密码 123456'); insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '初始化密码 123456');
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '深黑主题theme-dark浅色主题theme-light深蓝主题theme-blue'); insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '深黑主题theme-dark浅色主题theme-light深蓝主题theme-blue');
insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '是否开启注册用户功能'); insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '是否开启注册用户功能');
insert into sys_config values(5, '用户管理-密码字符范围', 'sys.account.chrtype', '0', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '默认任意字符范围0任意密码可以输入任意字符1数字密码只能为0-9数字2英文字母密码只能为a-z和A-Z字母3字母和数字密码必须包含字母数字,4字母数组和特殊字符密码包含字母,数字,特殊字符-_'); insert into sys_config values(5, '用户管理-密码字符范围', 'sys.account.chrtype', '0', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '默认任意字符范围0任意密码可以输入任意字符1数字密码只能为0-9数字2英文字母密码只能为a-z和A-Z字母3字母和数字密码必须包含字母数字,4字母数组和特殊字符密码必须包含字母,数字,特殊字符-_');
-- ---------------------------- -- ----------------------------

Loading…
Cancel
Save