Commit f19f28cf authored by BaiJiangJie's avatar BaiJiangJie

[Update] 获取用户授权资产时只返回资产协议支持的系统用户

parent 4d1da1d2
...@@ -174,6 +174,8 @@ class GrantAssetsMixin(LabelFilterMixin): ...@@ -174,6 +174,8 @@ class GrantAssetsMixin(LabelFilterMixin):
system_user = system_users_map.get(sid) system_user = system_users_map.get(sid)
if not system_user: if not system_user:
continue continue
if not asset.has_protocol(system_user.protocol):
continue
system_user.actions = action system_user.actions = action
system_users_granted.append(system_user) system_users_granted.append(system_user)
asset.system_users_granted = system_users_granted asset.system_users_granted = system_users_granted
......
...@@ -256,6 +256,8 @@ class UserGrantedNodesWithAssetsApi(UserPermissionCacheMixin, NodesWithUngroupMi ...@@ -256,6 +256,8 @@ class UserGrantedNodesWithAssetsApi(UserPermissionCacheMixin, NodesWithUngroupMi
system_user = _system_users_map.get(system_user_id) system_user = _system_users_map.get(system_user_id)
if not system_user: if not system_user:
continue continue
if not asset.has_protocol(system_user.protocol):
continue
system_user.actions = action system_user.actions = action
system_user_granted.append(system_user) system_user_granted.append(system_user)
asset.system_users_granted = system_user_granted asset.system_users_granted = system_user_granted
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment