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
9455a1c3
Unverified
Commit
9455a1c3
authored
Jul 16, 2019
by
BaiJiangJie
Committed by
GitHub
Jul 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2960 from jumpserver/dev_bai
[Update] 获取用户授权资产时只返回资产协议支持的系统用户
parents
4d1da1d2
f19f28cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
mixin.py
apps/perms/api/mixin.py
+2
-0
user_permission.py
apps/perms/api/user_permission.py
+2
-0
No files found.
apps/perms/api/mixin.py
View file @
9455a1c3
...
...
@@ -174,6 +174,8 @@ class GrantAssetsMixin(LabelFilterMixin):
system_user
=
system_users_map
.
get
(
sid
)
if
not
system_user
:
continue
if
not
asset
.
has_protocol
(
system_user
.
protocol
):
continue
system_user
.
actions
=
action
system_users_granted
.
append
(
system_user
)
asset
.
system_users_granted
=
system_users_granted
...
...
apps/perms/api/user_permission.py
View file @
9455a1c3
...
...
@@ -256,6 +256,8 @@ class UserGrantedNodesWithAssetsApi(UserPermissionCacheMixin, NodesWithUngroupMi
system_user
=
_system_users_map
.
get
(
system_user_id
)
if
not
system_user
:
continue
if
not
asset
.
has_protocol
(
system_user
.
protocol
):
continue
system_user
.
actions
=
action
system_user_granted
.
append
(
system_user
)
asset
.
system_users_granted
=
system_user_granted
...
...
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