Skip to content

Commit

Permalink
Fix tasks permission issue
Browse files Browse the repository at this point in the history
  • Loading branch information
GilbertCherrie committed Nov 29, 2023
1 parent 6a258bc commit 6116ec7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/miq_task_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class MiqTaskController < ApplicationController
].freeze

def index
assert_privileges('tasks_view')
assert_privileges('miq_task_all_ui', 'miq_task_my_ui', :any => false)
@tabform = nil
# TODO: remove :feature => "job_my_smartproxy" and :feature => "job_all_smartproxy" from miq_user_roles.yml
# above features assigned to the same roles as corresponding :feature => "miq_task_my_ui"
Expand All @@ -45,7 +45,7 @@ def index

# New tab was pressed
def change_tab
assert_privileges('tasks_view')
assert_privileges('miq_task_all_ui', 'miq_task_my_ui', :any => false)
@tabform = "tasks_#{params[:'uib-tab']}"
jobs
render :action => "jobs"
Expand All @@ -70,7 +70,7 @@ def build_jobs_tab

# Show job list for the current user
def jobs
assert_privileges('tasks_view')
assert_privileges('miq_task_all_ui', 'miq_task_my_ui', :any => false)
jobs_info
end

Expand Down

0 comments on commit 6116ec7

Please sign in to comment.