perf: No permission to test asset connectivity

v3.10.13-lts
feng 2024-08-21 11:28:39 +08:00 committed by feng626
parent 951aafcabd
commit 1712a9a104
1 changed files with 1 additions and 0 deletions

View File

@ -292,6 +292,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)