mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-10 20:00:10 +00:00
Assets_permission_action 优化 (#3585)
* [Update] 初步实现 actions的checkbox层叠嵌套 * [Update] 优化actions的checkbox层叠嵌套 * [Update] 修改校验用户/系统用户/资产的权限API可能会出现的问题 * [Update] 更新资产授权中动作的展示 * [Update] 更新资产授权中动作的展示 2 * [Update] 更新资产授权中动作的展示 3 Co-authored-by: BaiJiangJie <32935519+BaiJiangJie@users.noreply.github.com>
This commit is contained in:
@@ -84,6 +84,8 @@ class ValidateUserAssetPermissionApi(UserAssetPermissionMixin, APIView):
|
||||
system_users_actions = self.util.get_asset_system_users_with_actions(
|
||||
asset)
|
||||
actions = system_users_actions.get(system_user)
|
||||
if actions is None:
|
||||
return Response({'msg': False}, status=403)
|
||||
if action_name in Action.value_to_choices(actions):
|
||||
return Response({'msg': True}, status=200)
|
||||
return Response({'msg': False}, status=403)
|
||||
|
Reference in New Issue
Block a user