From fc0dcf1c10e4657a9a6c535f5a6388ea9779bfcf Mon Sep 17 00:00:00 2001 From: Zita Nemeckova Date: Wed, 4 Sep 2019 11:25:29 +0200 Subject: [PATCH] Allow Automate/Request without Service/Request rights Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1746386 --- 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 735a44e5f9a..b1d49c0d1d0 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)