mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
fix global schedule creation for project and inventory updates too
related: https://github.com/ansible/awx/pull/6193
This commit is contained in:
parent
a1c2db3db5
commit
acc34c1393
@ -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…
x
Reference in New Issue
Block a user