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
11f0024c
Commit
11f0024c
authored
Oct 31, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 添加登录复核开关
parent
dc3a9561
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
const.py
apps/assets/tasks/const.py
+4
-1
conf.py
apps/jumpserver/conf.py
+2
-1
context_processor.py
apps/jumpserver/context_processor.py
+1
-0
_nav.html
apps/templates/_nav.html
+1
-1
user_detail.html
apps/users/templates/users/user_detail.html
+3
-2
No files found.
apps/assets/tasks/const.py
View file @
11f0024c
...
...
@@ -7,7 +7,10 @@ from django.utils.translation import ugettext_lazy as _
ENV_PERIOD_TASK
=
os
.
environ
.
get
(
"PERIOD_TASK"
,
"on"
)
==
'on'
PERIOD_TASK_ENABLED
=
settings
.
PERIOD_TASK_ENABLED
and
ENV_PERIOD_TASK
ENV_PERIOD_TASK_ENABLED
=
os
.
environ
.
get
(
"PERIOD_TASK_ENABLED"
,
"on"
)
==
"on"
PERIOD_TASK_ENABLED
=
settings
.
CONFIG
.
PERIOD_TASK_ENABLE
\
and
ENV_PERIOD_TASK
\
and
ENV_PERIOD_TASK_ENABLED
UPDATE_ASSETS_HARDWARE_TASKS
=
[
{
...
...
apps/jumpserver/conf.py
View file @
11f0024c
...
...
@@ -394,8 +394,9 @@ defaults = {
'WINDOWS_SSH_DEFAULT_SHELL'
:
'cmd'
,
'FLOWER_URL'
:
"127.0.0.1:5555"
,
'DEFAULT_ORG_SHOW_ALL_USERS'
:
True
,
'PERIOD_TASK_ENABLE
D
'
:
True
,
'PERIOD_TASK_ENABLE'
:
True
,
'FORCE_SCRIPT_NAME'
:
''
,
'LOGIN_CONFIRM_ENABLE'
:
False
}
...
...
apps/jumpserver/context_processor.py
View file @
11f0024c
...
...
@@ -20,6 +20,7 @@ def jumpserver_processor(request):
'SECURITY_MFA_VERIFY_TTL'
:
settings
.
SECURITY_MFA_VERIFY_TTL
,
'FORCE_SCRIPT_NAME'
:
settings
.
FORCE_SCRIPT_NAME
,
'SECURITY_VIEW_AUTH_NEED_MFA'
:
settings
.
CONFIG
.
SECURITY_VIEW_AUTH_NEED_MFA
,
'LOGIN_CONFIRM_ENABLE'
:
settings
.
CONFIG
.
LOGIN_CONFIRM_ENABLE
,
}
return
context
...
...
apps/templates/_nav.html
View file @
11f0024c
...
...
@@ -121,7 +121,7 @@
</li>
{% endif %}
{% if request.user.can_admin_current_org %}
{% if request.user.can_admin_current_org
and LOGIN_CONFIRM_ENABLE
%}
<li
id=
"orders"
>
<a>
<i
class=
"fa fa-check-square-o"
style=
"width: 14px"
></i>
<span
class=
"nav-label"
>
{% trans 'Orders' %}
</span><span
class=
"fa arrow"
></span>
...
...
apps/users/templates/users/user_detail.html
View file @
11f0024c
...
...
@@ -212,7 +212,6 @@
</table>
</div>
</div>
{% if user_object.is_current_org_admin or user_object.is_superuser %}
<div
class=
"panel panel-info"
>
<div
class=
"panel-heading"
>
...
...
@@ -252,7 +251,7 @@
</table>
</div>
</div>
{%
endif
%}
{%
if LOGIN_CONFIRM_ENABLE
%}
<div
class=
"panel panel-warning"
>
<div
class=
"panel-heading"
>
<i
class=
"fa fa-info-circle"
></i>
{% trans 'Login confirm' %}
...
...
@@ -289,6 +288,8 @@
</table>
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
...
...
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