mirror of https://github.com/jumpserver/jumpserver
commit
b6af8368b6
|
@ -26,7 +26,7 @@ class PermSudo(models.Model):
|
||||||
class PermRole(models.Model):
|
class PermRole(models.Model):
|
||||||
name = models.CharField(max_length=100, unique=True)
|
name = models.CharField(max_length=100, unique=True)
|
||||||
comment = models.CharField(max_length=100, null=True, blank=True, default='')
|
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)
|
key_path = models.CharField(max_length=100)
|
||||||
date_added = models.DateTimeField(auto_now=True)
|
date_added = models.DateTimeField(auto_now=True)
|
||||||
sudo = models.ManyToManyField(PermSudo, related_name='perm_role')
|
sudo = models.ManyToManyField(PermSudo, related_name='perm_role')
|
||||||
|
|
|
@ -104,6 +104,10 @@ $('#roleForm').validator({
|
||||||
ok: "",
|
ok: "",
|
||||||
msg: {required: "系统用户名称必填"}
|
msg: {required: "系统用户名称必填"}
|
||||||
},
|
},
|
||||||
|
"role_password": {
|
||||||
|
rule: "length[0~64]",
|
||||||
|
tip: "系统密码"
|
||||||
|
},
|
||||||
"role_key": {
|
"role_key": {
|
||||||
rule: "check_begin",
|
rule: "check_begin",
|
||||||
ok: "",
|
ok: "",
|
||||||
|
|
|
@ -105,12 +105,16 @@ $('#roleForm').validator({
|
||||||
tip: "输入系统用户名称",
|
tip: "输入系统用户名称",
|
||||||
ok: "",
|
ok: "",
|
||||||
msg: {required: "系统用户名称必填"}
|
msg: {required: "系统用户名称必填"}
|
||||||
|
},
|
||||||
|
"role_password": {
|
||||||
|
rule: "length[0~64]",
|
||||||
|
tip: "系统密码"
|
||||||
},
|
},
|
||||||
"role_key": {
|
"role_key": {
|
||||||
rule: "check_begin",
|
rule: "check_begin",
|
||||||
ok: "",
|
ok: "",
|
||||||
empty: true
|
empty: true
|
||||||
},
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
valid: function(form) {
|
valid: function(form) {
|
||||||
|
|
Loading…
Reference in New Issue