ManageIQ/manageiq-ui-classic

View on GitHub
app/helpers/application_helper/button/tenant_add.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::TenantAdd < ApplicationHelper::Button::GenericFeatureButton
  needs :@record
  delegate :rbac_common_feature_for_buttons, :to => :@view_context

  def role_allows_feature?
    role_allows?(:feature => rbac_common_feature_for_buttons(@feature))
  end

  def visible?
    !@record.project?
  end
end