Description of problem: If I submit an automation request through the RESTful API as a non-admin user, the task is submitted correctly and goes into state 'Pending Approval". As an admin user in the WebUI I can see this task under Automate -> Requests, but there seems to be no way of approving it. Version-Release number of selected component (if applicable): 5.4.0.4.20150528174021_88cc76c How reproducible: Every time Steps to Reproduce: 1. Submit a an automation task through the RESTful API, specifying a non-admin user: post_params = { :version => '1.1', :uri_parts => { :namespace => namespace, :class => 'Methods', :instance => instance }, :parameters => parameter_hash, :requester => { :auto_approve => false } }.to_json query = "/api/automation_requests" rest_return = RestClient::Request.execute(method: :post, url: url + query, :user => username, \ :password => password, :headers => {:accept => :json}, :payload => post_params, verify_ssl: false) Actual results: The request goes into a "Pending Approval", but there seems to be no way of approving it. Expected results: An admin user should be able to see any request marked as Pending Approval, and approve any request. Additional info: If I change the :auto_approve => false to :auto_approve => true, I get a 500 Internal Server error back from CloudForms, but the request still seems to be submitted
gmccullo not sure this is API related. I see the problem at hand, created an InspectME automation request, request submitted, in the Automate->Requests page, I see the request details with Approval State "Pending Approval", yet no way to approve as admin. Is there a special entitlement to have to do this or is it to be approved a different way ? Thanks.
Interestingly, I created an automation request approval workflow and documented here: https://pemcg.gitbooks.io/introduction-to-cloudforms-automation/content/chapter21/automation_request_approval.html. When an approver receives an email containing a line such as: "To view this Request go to: https://192.168.1.245/miq_request/show/1000000000125" They can click on the URI and actually get the ability to approve the automation request; all works as expected. For some reason we just can't approve when we go through Automate -> Requests in the WebUI.
https://github.com/ManageIQ/manageiq/pull/8863
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/ccac5fb79c6655bb4c29469000dc36fdbae023d6 commit ccac5fb79c6655bb4c29469000dc36fdbae023d6 Author: Alberto Bellotti <abellott> AuthorDate: Fri May 20 12:50:42 2016 -0400 Commit: Alberto Bellotti <abellott> CommitDate: Fri May 20 15:46:39 2016 -0400 [api] Adding support for Automation Request approve/deny - Support approving or denying automation requests on multiple requests when targeting /api/automation_requests or single request when targeting /api/automation_requests/:id - support action "approve" - support action "deny" - updated spec/requests/api/automation_requests_spec.rb https://bugzilla.redhat.com/show_bug.cgi?id=1229818 .../api_controller/automation_requests.rb | 22 ++++++++ config/api.yml | 10 ++++ spec/requests/api/automation_requests_spec.rb | 62 ++++++++++++++++++++++ 3 files changed, 94 insertions(+)
Backported to Darga branch.
Verified in 5.6.0.10-rc2.1
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1348