Change policy list_runner_jobs -> read_runner

This commit is contained in:
Dylan Griffith 2018-05-10 14:53:24 +02:00
parent c3f9d80a6e
commit 8583e4a147
2 changed files with 1 additions and 2 deletions

View File

@ -10,7 +10,6 @@ module Ci
rule { admin | owned_runner }.enable :read_runner
rule { admin | owned_runner }.enable :update_runner
rule { admin | owned_runner }.enable :delete_runner
rule { admin | owned_runner }.enable :list_runner_jobs
rule { ~admin & locked }.prevent :assign_runner
end
end

View File

@ -214,7 +214,7 @@ module API
def authenticate_list_runners_jobs!(runner)
return if current_user.admin?
forbidden!("No access granted") unless can?(current_user, :list_runner_jobs, runner)
forbidden!("No access granted") unless can?(current_user, :read_runner, runner)
end
end
end