mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 13:55:31 +03:00
Merge pull request #6205 from ryanpetrello/proj-inv-sched
fix global schedule creation for project and inventory updates too Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
73e867b6f5
@ -2430,9 +2430,7 @@ class ScheduleAccess(BaseAccess):
|
||||
if not JobLaunchConfigAccess(self.user).can_add(data):
|
||||
return False
|
||||
if not data:
|
||||
return UnifiedJobTemplate.accessible_pk_qs(
|
||||
self.user, 'execute_role'
|
||||
).exists()
|
||||
return Role.objects.filter(role_field__in=['update_role', 'execute_role'], ancestors__in=self.user.roles.all()).exists()
|
||||
|
||||
return self.check_related('unified_job_template', UnifiedJobTemplate, data, role_field='execute_role', mandatory=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user