perf: No permission to test asset connectivity

pull/14011/head
feng 2024-08-21 11:28:39 +08:00
parent d86f241450
commit ecaf19563f
1 changed files with 1 additions and 0 deletions

View File

@ -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)