From 9a178e0c8743e1d350860693fd21329b7e578ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Z=C3=A1zrivec?= Date: Tue, 10 Sep 2019 11:07:48 +0200 Subject: [PATCH] Merge pull request #6147 from ZitaNemeckova/fix_ae_miq_request Set typ of tab before checking privilegies (cherry picked from commit d806e2fb32ffc23f9b48ab82c4086f28287d1b25) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1767647 --- app/controllers/miq_request_controller.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/miq_request_controller.rb b/app/controllers/miq_request_controller.rb index 3e84b7395fa..4b3f880c6ed 100644 --- a/app/controllers/miq_request_controller.rb +++ b/app/controllers/miq_request_controller.rb @@ -461,8 +461,11 @@ def approver? end def rbac_feature_id(feature_id) - return feature_id unless %w[ae host].include?(session[:request_tab]) - "#{session[:request_tab]}_#{feature_id}" + # set this to be used to identify which Requests subtab was clicked + @request_tab = params[:typ] || session[:request_tab] if @request_tab.nil? + return feature_id unless %w[ae host].include?(@request_tab) + + "#{@request_tab}_#{feature_id}" end # Delete all selected or single displayed action(s)