fix: 修复系统用户任务权限bug (#7753)

Co-authored-by: feng626 <1304903146@qq.com>
pull/7754/head
fit2bot 2022-03-07 16:01:02 +08:00 committed by GitHub
parent 615929dd43
commit 27560793f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -186,8 +186,8 @@ class SystemUserTaskApi(generics.CreateAPIView):
def check_permissions(self, request): def check_permissions(self, request):
action = request.data.get('action') action = request.data.get('action')
action_perm_require = { action_perm_require = {
'push': 'assets.push_systemuser', 'push': 'assets.push_assetsystemuser',
'test': 'assets.test_connectivity' 'test': 'assets.test_assetconnectivity'
} }
perm_required = action_perm_require.get(action) perm_required = action_perm_require.get(action)
has = self.request.user.has_perm(perm_required) has = self.request.user.has_perm(perm_required)