Browse Source

Merge pull request #14011 from jumpserver/pr@dev@test_asset

perf: No permission to test asset connectivity
pull/14029/head
ZhaoJiSen 3 months ago committed by GitHub
parent
commit
9b59954393
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      apps/assets/api/asset/asset.py

1
apps/assets/api/asset/asset.py

@ -298,6 +298,7 @@ class AssetsTaskCreateApi(AssetsTaskMixin, generics.CreateAPIView):
def check_permissions(self, request):
action_perm_require = {
"refresh": "assets.refresh_assethardwareinfo",
"test": "assets.test_assetconnectivity",
}
_action = request.data.get("action")
perm_required = action_perm_require.get(_action)

Loading…
Cancel
Save