Skip to content

Commit

Permalink
Merge pull request #1214 from lpichler/rbac_for_selection_of_requeste…
Browse files Browse the repository at this point in the history
…rs_for_miq_requests

Add RBAC for requesters in MiqRequest
(cherry picked from commit 15e285a)
  • Loading branch information
mzazrivec authored and simaishi committed Jun 8, 2017
1 parent 91f0372 commit e6c1fe7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/miq_request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,10 @@ def prov_set_default_options
opts[:reason_text] = nil
opts[:types] = request_types_for_dropdown

opts[:users] = MiqRequest.where(
opts[:users] = Rbac::Filterer.filtered(MiqRequest.where(
:type => request_types_for_model.keys,
:created_on => (30.days.ago.utc)..(Time.now.utc)
).each_with_object({}) do |r, h|
)).each_with_object({}) do |r, h|
h[r.requester_id] = if r.requester.nil?
(_("%{name} (no longer exists)") % {:name => r.requester_name})
else
Expand Down

0 comments on commit e6c1fe7

Please sign in to comment.