Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
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
coco
Commits
063d9db7
Commit
063d9db7
authored
Dec 14, 2018
by
BaiJiangJie
Committed by
老广
Dec 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修复系统用户搜索登录和p后登录表现不一致的bug (#137)
parent
4a170349
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
interactive.py
coco/interactive.py
+8
-5
No files found.
coco/interactive.py
View file @
063d9db7
...
...
@@ -58,10 +58,6 @@ class InteractiveServer:
@search_result.setter
def
search_result
(
self
,
value
):
if
not
value
:
self
.
_search_result
=
value
return
value
=
self
.
filter_system_users
(
value
)
self
.
_search_result
=
value
def
display_logo
(
self
):
...
...
@@ -122,6 +118,7 @@ class InteractiveServer:
def
search_assets
(
self
,
q
):
if
not
self
.
finish
:
assets
=
app_service
.
get_search_user_granted_assets
(
self
.
client
.
user
,
q
)
assets
=
self
.
filter_system_users
(
assets
)
return
assets
assets
=
self
.
assets_list
result
=
[]
...
...
@@ -194,7 +191,7 @@ class InteractiveServer:
self
.
display_nodes_tree
()
return
assets
=
self
.
nodes
[
_id
-
1
]
.
assets_granted
assets
=
self
.
nodes
[
_id
-
1
]
.
assets_granted
self
.
display_result_paging
(
assets
)
def
display_search_result
(
self
):
...
...
@@ -234,6 +231,7 @@ class InteractiveServer:
def
get_user_nodes
(
self
):
self
.
nodes
=
app_service
.
get_user_asset_groups
(
self
.
client
.
user
)
self
.
filter_nodes_assets_system_user
()
self
.
sort_nodes
()
self
.
construct_nodes_tree
()
...
...
@@ -265,6 +263,10 @@ class InteractiveServer:
asset
.
system_users_granted
=
system_users_cleaned
return
assets
def
filter_nodes_assets_system_user
(
self
):
for
node
in
self
.
nodes
:
node
.
assets_granted
=
self
.
filter_system_users
(
node
.
assets_granted
)
def
get_user_assets_paging
(
self
):
while
not
self
.
closed
:
assets
,
total
=
app_service
.
get_user_assets_paging
(
...
...
@@ -278,6 +280,7 @@ class InteractiveServer:
if
not
self
.
total_assets
:
self
.
total_assets
=
total
self
.
total_count
=
total
assets
=
self
.
filter_system_users
(
assets
)
self
.
assets_list
.
extend
(
assets
)
self
.
offset
+=
self
.
limit
...
...
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