From b3ca1f789cecc857dad04502a3cde4eda542bf36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hal=C3=A1sz?= Date: Fri, 12 Jun 2020 09:57:15 +0200 Subject: [PATCH] Rename the features_tree when not in edit mode under Access Control --- app/controllers/ops_controller/ops_rbac.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/ops_controller/ops_rbac.rb b/app/controllers/ops_controller/ops_rbac.rb index 4f3c23bd978..ca66d752baa 100644 --- a/app/controllers/ops_controller/ops_rbac.rb +++ b/app/controllers/ops_controller/ops_rbac.rb @@ -969,7 +969,8 @@ def rbac_role_get_details(id) def build_rbac_feature_tree @role = @sb[:typ] == "copy" ? @record.dup : @record if @role.nil? # if on edit screen use @record @role.miq_product_features = @record.miq_product_features if @sb[:typ] == "copy" - TreeBuilderOpsRbacFeatures.new("features_tree", @sb, true, :role => @role, :editable => @edit.present?) + # The edit/noedit tree should have a different name due to a collision between RJS and Redux + TreeBuilderOpsRbacFeatures.new(@edit.present? ? "features_tree" : "features_tree_noedit", @sb, true, :role => @role, :editable => @edit.present?) end # Set form variables for user edit