summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-10 14:53:24 +0200
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-16 10:52:28 +0200
commit8583e4a1478ffe94dfd75c51c8480b323cada6df (patch)
tree0ee5f8df67f4c6f92917d72f8c149819ebc11bfc
parentc3f9d80a6e0950361e056ded4107015d3923f56d (diff)
downloadgitlab-ce-8583e4a1478ffe94dfd75c51c8480b323cada6df.tar.gz
Change policy list_runner_jobs -> read_runner
-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