Skip to content

Commit

Permalink
Merge pull request #8978 from GilbertCherrie/fix_tasks_permissions
Browse files Browse the repository at this point in the history
Fix tasks permission issue
  • Loading branch information
jeffibm authored Dec 5, 2023
2 parents 93e2460 + 6116ec7 commit 6662ffb
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 6662ffb

Please sign in to comment.