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
31629fc9
Commit
31629fc9
authored
Mar 01, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复资产禁用还可以登录
parent
521a5c57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
node.py
apps/assets/models/node.py
+6
-0
utils.py
apps/perms/utils.py
+2
-2
login.html
apps/users/templates/users/login.html
+4
-4
No files found.
apps/assets/models/node.py
View file @
31629fc9
...
...
@@ -61,6 +61,9 @@ class Node(models.Model):
assets
=
Asset
.
objects
.
filter
(
nodes__id
=
self
.
id
)
return
assets
def
get_active_assets
(
self
):
return
self
.
get_assets
()
.
filter
(
is_active
=
True
)
def
get_all_assets
(
self
):
from
.asset
import
Asset
if
self
.
is_root
():
...
...
@@ -70,6 +73,9 @@ class Node(models.Model):
assets
=
Asset
.
objects
.
filter
(
nodes__in
=
nodes
)
return
assets
def
get_all_active_assets
(
self
):
return
self
.
get_all_assets
()
.
filter
(
is_active
=
True
)
def
is_root
(
self
):
return
self
.
key
==
'0'
...
...
apps/perms/utils.py
View file @
31629fc9
...
...
@@ -56,7 +56,7 @@ class NodePermissionUtil:
nodes_with_assets
=
dict
()
for
node
,
system_users
in
nodes
.
items
():
nodes_with_assets
[
node
]
=
{
'assets'
:
node
.
get_assets
(),
'assets'
:
node
.
get_a
ctive_a
ssets
(),
'system_users'
:
system_users
}
return
nodes_with_assets
...
...
@@ -87,7 +87,7 @@ class NodePermissionUtil:
nodes_with_assets
=
dict
()
for
node
,
system_users
in
nodes
.
items
():
nodes_with_assets
[
node
]
=
{
'assets'
:
node
.
get_assets
(),
'assets'
:
node
.
get_a
ctive_a
ssets
(),
'system_users'
:
system_users
}
return
nodes_with_assets
...
...
apps/users/templates/users/login.html
View file @
31629fc9
...
...
@@ -24,16 +24,16 @@
<div
class=
"col-md-6"
>
<h2
class=
"font-bold"
>
欢迎使用Jumpserver开源跳板机
</h2>
<p>
Jumpserver是一款使用Python, Django开发的开源跳板机系统, 助力互联网企业高效 用户、资产、权限、审计 管理
符合4A规范的专业运维审计系统:拥有跳板机的所有功能,认证,授权,审计,文件上传;
</p>
<p>
我们自五湖四海,我们对开源精神无比敬仰和崇拜,我们对完美、整洁、优雅 无止境的追求
极致的用户使用体验:拥有时尚外观是区别与以往版本和其他软件的铭牌,高雅的气质让你爱不释手;
</p>
<p>
专注自动化运维,努力打造 易用、稳定、安全、自动化 的跳板机, 这是我们的不懈的追求和动力
混合云环境下的堡垒机:怎么能容忍传统堡垒机的繁琐步骤,Jumpserver让你极致省力。
</p>
<p>
<small>
永远年轻,永远热泪盈眶 stay foolish stay hungry
</small>
<small>
改变世界,从一点点开始
</small>
</p>
</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