mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 00:08:44 -03:30
Change access to only allow super users to post to the jobs list without
a job template
This commit is contained in:
@@ -1011,6 +1011,9 @@ class JobAccess(BaseAccess):
|
|||||||
add_data.setdefault('credential', job_template.credential.pk)
|
add_data.setdefault('credential', job_template.credential.pk)
|
||||||
else:
|
else:
|
||||||
job_template = None
|
job_template = None
|
||||||
|
# Only admins can create jobs without job templates
|
||||||
|
if not self.user.is_superuser:
|
||||||
|
return False
|
||||||
|
|
||||||
# Check that the user would be able to add a job template with the
|
# Check that the user would be able to add a job template with the
|
||||||
# same data.
|
# same data.
|
||||||
|
|||||||
Reference in New Issue
Block a user