Change access to only allow super users to post to the jobs list without

a job template
This commit is contained in:
Matthew Jones 2014-09-05 14:54:33 -04:00
parent 85762c3470
commit 2da1189a7c

View File

@ -1011,6 +1011,9 @@ class JobAccess(BaseAccess):
add_data.setdefault('credential', job_template.credential.pk)
else:
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
# same data.