mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
Make the bulk endpoint templates work in API browser
Various fixes - Don't skip checking resource RBAC permissions for admins Necessary to handle bad input, e.g. providing a unified_job_template id that doesn't exit - In awxkit, only "walk" if we get 'url' in the result - Bulk host create should return url pointing to inventory, not inventory/hosts dont do org check for superuser
This commit is contained in:
committed by
Elijah DeLee
parent
9358d59f20
commit
7cb16ef91d
@@ -15,7 +15,10 @@ page.register_page([resources.bulk, (resources.bulk, 'get')], Bulk)
|
||||
class BulkJobLaunch(base.Base):
|
||||
def post(self, payload={}):
|
||||
result = self.connection.post(self.endpoint, payload)
|
||||
return self.walk(result.json()['url'])
|
||||
if 'url' in result.json():
|
||||
return self.walk(result.json()['url'])
|
||||
else:
|
||||
return self.page_identity(result, request_json={})
|
||||
|
||||
|
||||
page.register_page(resources.bulk_job_launch, BulkJobLaunch)
|
||||
|
||||
Reference in New Issue
Block a user