Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
4c88ea3c
Commit
4c88ea3c
authored
Mar 21, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(perm_role_add) 修复添加系统用户密码过长导致的异常bug
1. 修改表结构password长度 2. 修改template添加js验证
parent
0e5fd68e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
models.py
jperm/models.py
+1
-1
perm_role_add.html
templates/jperm/perm_role_add.html
+4
-0
No files found.
jperm/models.py
View file @
4c88ea3c
...
...
@@ -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
=
1
00
)
password
=
models
.
CharField
(
max_length
=
1
28
)
key_path
=
models
.
CharField
(
max_length
=
100
)
date_added
=
models
.
DateTimeField
(
auto_now
=
True
)
sudo
=
models
.
ManyToManyField
(
PermSudo
,
related_name
=
'perm_role'
)
...
...
templates/jperm/perm_role_add.html
View file @
4c88ea3c
...
...
@@ -104,6 +104,10 @@ $('#roleForm').validator({
ok
:
""
,
msg
:
{
required
:
"系统用户名称必填"
}
},
"role_password"
:
{
rule
:
"length[0~64]"
,
tip
:
"系统密码"
},
"role_key"
:
{
rule
:
"check_begin"
,
ok
:
""
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment