diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-10 14:53:24 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-16 10:52:28 +0200 |
commit | 8583e4a1478ffe94dfd75c51c8480b323cada6df (patch) | |
tree | 0ee5f8df67f4c6f92917d72f8c149819ebc11bfc | |
parent | c3f9d80a6e0950361e056ded4107015d3923f56d (diff) | |
download | gitlab-ce-8583e4a1478ffe94dfd75c51c8480b323cada6df.tar.gz |
Change policy list_runner_jobs -> read_runner
-rw-r--r-- | app/policies/ci/runner_policy.rb | 1 | ||||
-rw-r--r-- | lib/api/runners.rb | 2 |
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 |