mirror of
https://github.com/ansible/awx.git
synced 2026-05-02 15:15:30 -02:30
fix bug, handle RBAC, add test
This commit is contained in:
committed by
Jake McDermott
parent
44fa3b18a9
commit
0c52d17951
@@ -3117,6 +3117,9 @@ class WorkflowJobTemplateLaunch(WorkflowsEnforcementMixin, RetrieveAPIView):
|
||||
if not serializer.is_valid():
|
||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
if not request.user.can_access(JobLaunchConfig, 'add', serializer.validated_data, template=obj):
|
||||
raise PermissionDenied()
|
||||
|
||||
new_job = obj.create_unified_job(**serializer.validated_data)
|
||||
new_job.signal_start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user