mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
Fix up ScheduleAccess queryset to fit between schedules and unified jobs
This commit is contained in:
parent
49f6bd3e1c
commit
54599578a0
@ -1098,7 +1098,10 @@ class ScheduleAccess(BaseAccess):
|
||||
job_template_qs = self.user.get_queryset(JobTemplate)
|
||||
inventory_source_qs = self.user.get_queryset(InventorySource)
|
||||
project_qs = self.user.get_queryset(Project)
|
||||
return qs | job_template_qs | inventory_source_qs | project_qs
|
||||
unified_qs = UnifiedJobTemplate.objects.filter(jobtemplate__in=job_template_qs) | \
|
||||
UnifiedJobTemplate.objects.filter(Q(project__in=project_qs)) | \
|
||||
UnifiedJobTemplate.objects.filter(Q(inventorysource__in=inventory_source_qs))
|
||||
return qs.filter(unified_job_template__in=unified_qs)
|
||||
|
||||
def can_read(self, obj):
|
||||
if self.user.is_superuser:
|
||||
|
Loading…
Reference in New Issue
Block a user