mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Fix AC-293. Explicitly check for start/cancel permissions on job for access to job start/cancel views.
This commit is contained in:
@@ -782,6 +782,7 @@ class JobDetail(RetrieveUpdateDestroyAPIView):
|
||||
class JobStart(generics.GenericAPIView):
|
||||
|
||||
model = Job
|
||||
is_job_start = True
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
obj = self.get_object()
|
||||
@@ -807,6 +808,7 @@ class JobStart(generics.GenericAPIView):
|
||||
class JobCancel(generics.GenericAPIView):
|
||||
|
||||
model = Job
|
||||
is_job_cancel = True
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
obj = self.get_object()
|
||||
|
||||
Reference in New Issue
Block a user