Skip to content

Commit

Permalink
Require allowed list of cloud tenant for toolbar button
Browse files Browse the repository at this point in the history
in new cloud volume form

if permission for list of cloud tenant(cloud_tenant_show_list) is missing

Fixes  ManageIQ#3165
  • Loading branch information
lpichler committed Jan 8, 2018
1 parent 7aa6bfd commit cb06e97
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/helpers/application_helper/button/cloud_volume_new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ def calculate_properties
end
end

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

# disable button if no active providers support create action
def disabled?
ExtManagementSystem.all.none? { |ems| CloudVolume.class_by_ems(ems).supports_create? }
Expand Down

0 comments on commit cb06e97

Please sign in to comment.