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
d604639b
Commit
d604639b
authored
9 years ago
by
yumaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复添加role 时 因私钥格式不对而引起的bug(2)
parent
3248ee1a
master
auditor_jym
audits
dev
dev_beta
dev_beta_db
gengmei
lagacy-0.4.0
node_service
password
rbac
restrict_access
test
v52
wph
1.5.2
1.5.1
1.5.0
1.4.10
1.4.9
1.4.8
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.3
1.3.2
1.3.1
1.3.0
1.2.1
1.2.0
1.1.1
1.1.0
1.0.0
0.3.3
0.3.2
0.3.2-rc2
0.3.1
0.3.0-beta
v1.4.10
v1.4.7
v1.4.4
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
views.py
jperm/views.py
+1
-1
perm_role_add.html
templates/jperm/perm_role_add.html
+4
-3
No files found.
jperm/views.py
View file @
d604639b
...
...
@@ -284,7 +284,7 @@ def perm_role_add(request):
try
:
if
get_object
(
PermRole
,
name
=
name
):
raise
ServerError
(
'已经存在该用户
%
s'
%
name
)
raise
ServerError
(
u
'已经存在该用户
%
s'
%
name
)
default
=
get_object
(
Setting
,
name
=
'default'
)
if
password
:
...
...
This diff is collapsed.
Click to expand it.
templates/jperm/perm_role_add.html
View file @
d604639b
...
...
@@ -93,7 +93,7 @@ $('#roleForm').validator({
theme
:
"yellow_right_effect"
,
rules
:
{
check_name
:
[
/^
\w{2,20}
$/
,
'大小写字母数字和下划线,2-20位'
],
check_begin
:
[
/^
[\-]
+BEGIN RSA PRIVATE KEY
[\-]
+/gm
,
'
请填写正确的RSA Key
'
],
check_begin
:
[
/^
[\-]
+BEGIN RSA PRIVATE KEY
[\-]
+/gm
,
'
RSA Key填写有误,请检查
'
],
{
#
either
:
function
(){
#
}
{
#
return
$
(
'#role_password'
).
val
()
==
''
#
}
{
#
}
#
}
...
...
@@ -107,8 +107,9 @@ $('#roleForm').validator({
msg
:
{
required
:
"系统用户名称必填"
}
},
"role_key"
:
{
rule
:
"required;check_begin"
,
tip
:
"请输入正确格式的RSA私钥"
rule
:
"check_begin"
,
ok
:
""
,
empty
:
true
},
{
#
"role_key"
:
{
#
}
{
#
rule
:
"required(either)"
,
#
}
...
...
This diff is collapsed.
Click to expand it.
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