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
f984acf1
Commit
f984acf1
authored
Oct 21, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复导致favorite 和 empty 同时出现
parent
87c7452d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
asset_permission.py
apps/perms/utils/asset_permission.py
+4
-1
No files found.
apps/perms/utils/asset_permission.py
View file @
f984acf1
...
...
@@ -234,6 +234,9 @@ class AssetPermissionUtilV2(AssetPermissionUtilCacheMixin):
if
user_tree
.
contains
(
key
):
nodes_single_assets
.
pop
(
key
)
if
not
nodes_single_assets
:
return
# 如果要设置到ungroup中
if
settings
.
PERM_SINGLE_ASSET_TO_UNGROUP_NODE
:
node_key
=
Node
.
ungrouped_key
...
...
@@ -336,8 +339,8 @@ class AssetPermissionUtilV2(AssetPermissionUtilCacheMixin):
self
.
add_direct_nodes_to_user_tree
(
user_tree
)
self
.
add_single_assets_node_to_user_tree
(
user_tree
)
self
.
parse_user_tree_to_full_tree
(
user_tree
)
self
.
add_empty_node_if_need
(
user_tree
)
self
.
add_favorite_node_if_need
(
user_tree
)
self
.
add_empty_node_if_need
(
user_tree
)
self
.
set_user_tree_to_cache_if_need
(
user_tree
)
self
.
set_user_tree_to_local
(
user_tree
)
return
user_tree
...
...
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