mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-12 06:08:22 +00:00
fix(perm_role_add) 修复添加系统用户密码过长导致的异常bug
1. 修改表结构password长度 2. 修改template添加js验证
This commit is contained in:
parent
0e5fd68e6c
commit
4c88ea3c05
@ -26,7 +26,7 @@ class PermSudo(models.Model):
|
||||
class PermRole(models.Model):
|
||||
name = models.CharField(max_length=100, unique=True)
|
||||
comment = models.CharField(max_length=100, null=True, blank=True, default='')
|
||||
password = models.CharField(max_length=100)
|
||||
password = models.CharField(max_length=128)
|
||||
key_path = models.CharField(max_length=100)
|
||||
date_added = models.DateTimeField(auto_now=True)
|
||||
sudo = models.ManyToManyField(PermSudo, related_name='perm_role')
|
||||
|
@ -104,6 +104,10 @@ $('#roleForm').validator({
|
||||
ok: "",
|
||||
msg: {required: "系统用户名称必填"}
|
||||
},
|
||||
"role_password": {
|
||||
rule: "length[0~64]",
|
||||
tip: "系统密码"
|
||||
},
|
||||
"role_key": {
|
||||
rule: "check_begin",
|
||||
ok: "",
|
||||
|
Loading…
Reference in New Issue
Block a user