summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/policies/ci/runner_policy.rb1
-rw-r--r--lib/api/runners.rb2
2 files changed, 1 insertions, 2 deletions
diff --git a/app/policies/ci/runner_policy.rb b/app/policies/ci/runner_policy.rb
index 61912696e88..4649dc645ba 100644
--- a/app/policies/ci/runner_policy.rb
+++ b/app/policies/ci/runner_policy.rb
@@ -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
diff --git a/lib/api/runners.rb b/lib/api/runners.rb
index 4f12aeac1fd..c6dc40ae789 100644
--- a/lib/api/runners.rb
+++ b/lib/api/runners.rb
@@ -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