Skip to content

Commit

Permalink
Merge pull request #3531 from mansam/filter-networks-for-floating-ips
Browse files Browse the repository at this point in the history
Apply RBAC filtering to cloud networks when creating floating ips
(cherry picked from commit 4773d1f)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553787
  • Loading branch information
Dan Clarizio authored and simaishi committed Mar 9, 2018
1 parent f26b6ca commit e87c6ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/floating_ip_controller.rb
Expand Up @@ -152,7 +152,7 @@ def floating_ip_form_fields
def networks_by_ems
assert_privileges("floating_ip_new")
networks = []
available_networks = CloudNetwork.where(:ems_id => params[:id], :external_facing => true).find_each
available_networks = Rbac::Filterer.filtered(CloudNetwork.where(:ems_id => params[:id], :external_facing => true))
available_networks.each do |network|
networks << { 'name' => network.name, 'id' => network.id }
end
Expand Down

0 comments on commit e87c6ba

Please sign in to comment.