Skip to content

Commit

Permalink
Add any product product feature for customization in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
lpichler committed Oct 16, 2018
1 parent eafe89a commit fd6ede8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/presenters/menu/default_menu.rb
Expand Up @@ -236,8 +236,8 @@ def automate_menu_section
Menu::Section.new(:automate, N_("Automate"), 'pficon pficon-automation', [
Menu::Item.new('miq_ae_class', N_('Explorer'), 'miq_ae_class_explorer', {:feature => 'miq_ae_domain_view'}, '/miq_ae_class/explorer'),
Menu::Item.new('miq_ae_tools', N_('Simulation'), 'miq_ae_class_simulation', {:feature => 'miq_ae_class_simulation'}, '/miq_ae_tools/resolve'),
Menu::Item.new('miq_ae_customization', N_('Customization'), 'miq_ae_customization_explorer', {:feature => 'miq_ae_customization_explorer'}, '/miq_ae_customization/explorer'),
Menu::Item.new('generic_object_definition', N_('Generic Objects'), 'generic_object_definition', {:feature => 'generic_object_definition'}, '/generic_object_definition/show_list'),
Menu::Item.new('miq_ae_customization', N_('Customization'), 'miq_ae_customization_explorer', {:feature => 'miq_ae_customization_explorer', :any => true}, '/miq_ae_customization/explorer'),
Menu::Item.new('miq_ae_export', N_('Import / Export'), 'miq_ae_class_import_export', {:feature => 'miq_ae_class_import_export'}, '/miq_ae_tools/import_export'),
Menu::Item.new('miq_ae_logs', N_('Log'), 'miq_ae_class_log', {:feature => 'miq_ae_class_log'}, '/miq_ae_tools/log'),
Menu::Item.new('miq_request_ae', N_('Requests'), 'ae_miq_request', {:feature => 'ae_miq_request_show_list'}, '/miq_request/show_list?typ=ae')
Expand Down
8 changes: 8 additions & 0 deletions spec/presenters/menu/default_menu_spec.rb
Expand Up @@ -149,6 +149,14 @@
"Log",
"Requests"
)

expect(menu.automate_menu_section.items.map(&:rbac_feature)). to eq([{:feature => "miq_ae_domain_view"},
{:feature => "miq_ae_class_simulation"},
{:feature => "miq_ae_customization_explorer", :any => true},
{:feature => "generic_object_definition"},
{:feature => "miq_ae_class_import_export"},
{:feature => "miq_ae_class_log"},
{:feature => "ae_miq_request_show_list"}])
end
end
end
Expand Down

0 comments on commit fd6ede8

Please sign in to comment.