Skip to content

Commit

Permalink
require allowed network providers
Browse files Browse the repository at this point in the history
  • Loading branch information
lpichler committed Jan 4, 2018
1 parent b658da9 commit c5b734f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/helpers/application_helper/button/cloud_network_new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ def supports_button_action?
::EmsNetwork.all.any? { |ems| CloudNetwork.class_by_ems(ems).supports_create? }
end

def role_allows_feature?
role_allows?(:feature => 'ems_network_show_list')
end

def disabled?
@error_message = _("No cloud provider supports creating host aggregates.") unless supports_button_action?
super || @error_message.present?
Expand Down

0 comments on commit c5b734f

Please sign in to comment.