From 61b9e13907d9f5feec9a8f6b9b10d383512b164d Mon Sep 17 00:00:00 2001 From: Chris Hale Date: Thu, 28 Sep 2017 11:51:02 -0600 Subject: [PATCH 1/2] Added SUI features into features tree --- app/presenters/tree_builder_ops_rbac_features.rb | 4 ++++ spec/presenters/tree_builder_ops_rbac_features_spec.rb | 1 + 2 files changed, 5 insertions(+) diff --git a/app/presenters/tree_builder_ops_rbac_features.rb b/app/presenters/tree_builder_ops_rbac_features.rb index 0d5528a6229..d1d21ae756f 100644 --- a/app/presenters/tree_builder_ops_rbac_features.rb +++ b/app/presenters/tree_builder_ops_rbac_features.rb @@ -45,6 +45,10 @@ def x_get_tree_roots(count_only = false, _options) top_nodes << MiqProductFeature.obj_features[additional_feature][:feature] end + %w(all_vm_rules sui).each do |additional_feature| + top_nodes << MiqProductFeature.obj_features[additional_feature][:feature] + end + count_only_or_objects(count_only, top_nodes) end diff --git a/spec/presenters/tree_builder_ops_rbac_features_spec.rb b/spec/presenters/tree_builder_ops_rbac_features_spec.rb index c54cb5d8d04..3c2907cd853 100644 --- a/spec/presenters/tree_builder_ops_rbac_features_spec.rb +++ b/spec/presenters/tree_builder_ops_rbac_features_spec.rb @@ -8,6 +8,7 @@ instance_show_list instance_control instance_scan + sui ) end From b0ac917912d19f76b87e8ce17bb5a3b14d75d493 Mon Sep 17 00:00:00 2001 From: Chris Hale Date: Mon, 2 Oct 2017 15:11:51 -0600 Subject: [PATCH 2/2] Moved SUI node under additional feature list --- app/presenters/tree_builder_ops_rbac_features.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/presenters/tree_builder_ops_rbac_features.rb b/app/presenters/tree_builder_ops_rbac_features.rb index d1d21ae756f..11885dbc405 100644 --- a/app/presenters/tree_builder_ops_rbac_features.rb +++ b/app/presenters/tree_builder_ops_rbac_features.rb @@ -41,11 +41,7 @@ def x_get_tree_roots(count_only = false, _options) section end - %w(all_vm_rules api_exclusive).each do |additional_feature| - top_nodes << MiqProductFeature.obj_features[additional_feature][:feature] - end - - %w(all_vm_rules sui).each do |additional_feature| + %w(all_vm_rules api_exclusive sui).each do |additional_feature| top_nodes << MiqProductFeature.obj_features[additional_feature][:feature] end