Skip to content

Commit

Permalink
Merge pull request #497 from d-m-u/fixing_make_retire_request_call_wi…
Browse files Browse the repository at this point in the history
…th_user_thingyamabobbers_n_stuff_for_great_justice

Need the user on this call

(cherry picked from commit cf295f0)

https://bugzilla.redhat.com/show_bug.cgi?id=1618530
  • Loading branch information
bdunne authored and simaishi committed Oct 18, 2018
1 parent 9439ad5 commit 50eef54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/api/base_controller/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def request_retire_resource(type, id, _data = nil)
if api_user_role_allows?('miq_request_approval')
klass = collection_class(type)
if id
msg = "Retiring #{type} id #{id} immediately as a request."
msg = "#{User.current_user.userid} retiring #{type} id #{id} immediately as a request."
resource = resource_search(id, type, klass)
api_log_info(msg)
klass.make_retire_request(resource.id)
klass.make_retire_request(resource.id, User.current_user)
else
raise BadRequestError, "Must specify an id for retiring a #{type} resource"
end
Expand Down

0 comments on commit 50eef54

Please sign in to comment.