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
38f72a85
Commit
38f72a85
authored
9 years ago
by
yumaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改前端禁止root的正则表达式,做精确匹配
parent
34e8b321
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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
perm_role_add.html
templates/jperm/perm_role_add.html
+2
-3
perm_role_edit.html
templates/jperm/perm_role_edit.html
+1
-2
No files found.
templates/jperm/perm_role_add.html
View file @
38f72a85
...
...
@@ -92,15 +92,14 @@ $('#roleForm').validator({
timely
:
2
,
theme
:
"yellow_right_effect"
,
rules
:
{
check_name
:
[
/^
\w{2,20}
$/
,
'大小写字母数字和下划线,2-20位'
],
check_name_root
:
[
/
[^
rR
][^
oO
][^
oO
][^
tT
]
/
,
'禁止使用root用户作为系统用户,这样非常危险!'
],
check_name
:
[
/
(?!
root
)
^
\w{2,20}
$/i
,
'大小写字母数字和下划线,2-20位,并且非root'
],
check_begin
:
[
/^
[\-]
+BEGIN RSA PRIVATE KEY
[\-]
+/gm
,
'RSA Key填写有误,请检查'
],
},
fields
:
{
"role_name"
:
{
rule
:
"required;check_name
;check_name_root
"
,
rule
:
"required;check_name"
,
tip
:
"输入系统用户名称"
,
ok
:
""
,
msg
:
{
required
:
"系统用户名称必填"
}
...
...
This diff is collapsed.
Click to expand it.
templates/jperm/perm_role_edit.html
View file @
38f72a85
...
...
@@ -94,8 +94,7 @@ $('#roleForm').validator({
timely
:
2
,
theme
:
"yellow_right_effect"
,
rules
:
{
check_name
:
[
/^
\w{2,20}
$/
,
'大小写字母数字和下划线,2-20位'
],
check_name_root
:
[
/
[^
rR
][^
oO
][^
oO
][^
tT
]
/
,
'禁止使用root用户作为系统用户,这样非常危险!'
],
check_name
:
[
/
(?!
root
)
^
\w{2,20}
$/i
,
'大小写字母数字和下划线,2-20位,并且非root'
],
check_begin
:
[
/^
[\-]
+BEGIN RSA PRIVATE KEY
[\-]
+/gm
,
'RSA Key填写有误,请检查'
],
},
...
...
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