mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 15:58:45 -03:30
Move view around and inherit from right view to get OPTIONS
we needed to inherit from GenericAPIView to get the options to render correctly q! add execution env support add organization validation to the workflowjob Update awx/api/serializers.py Co-authored-by: Elijah DeLee <kdelee@redhat.com> Update awx/api/serializers.py Co-authored-by: Elijah DeLee <kdelee@redhat.com>
This commit is contained in:
@@ -2123,7 +2123,11 @@ class WorkflowJobAccess(BaseAccess):
|
||||
)
|
||||
|
||||
def filtered_queryset(self):
|
||||
return WorkflowJob.objects.filter(unified_job_template__in=UnifiedJobTemplate.accessible_pk_qs(self.user, 'read_role'))
|
||||
return WorkflowJob.objects.filter(
|
||||
Q(unified_job_template__in=UnifiedJobTemplate.accessible_pk_qs(self.user, 'read_role'))
|
||||
| Q(created_by__in=str(self.user.id), is_bulk_job=True)
|
||||
| Q(organization__in=Organization.objects.filter(Q(admin_role__members=self.user)), is_bulk_job=True)
|
||||
)
|
||||
|
||||
def can_add(self, data):
|
||||
# Old add-start system for launching jobs is being depreciated, and
|
||||
|
||||
Reference in New Issue
Block a user