summaryrefslogtreecommitdiff
path: root/lib/api/runners.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-06-26 11:36:54 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-06-26 15:53:09 +0200
commitca93faf15f822cbf3eda5e87d4aaaaa81d413a8b (patch)
tree39dec7f4ac7269ae2a30d22e15584b4b3385b144 /lib/api/runners.rb
parent7da7af3a22058a6fb4e22cbf2b659e910cc92d54 (diff)
downloadgitlab-ce-ca93faf15f822cbf3eda5e87d4aaaaa81d413a8b.tar.gz
Remove the use of `is_shared` of `Ci::Runner`remove-is-shared-from-ci-runners
Diffstat (limited to 'lib/api/runners.rb')
-rw-r--r--lib/api/runners.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb
index 2b78075ddbf..6443e88e806 100644
--- a/lib/api/runners.rb
+++ b/lib/api/runners.rb
@@ -119,7 +119,7 @@ module API
use :pagination
end
get ':id/runners' do
- runners = filter_runners(Ci::Runner.owned_or_shared(user_project.id), params[:scope])
+ runners = filter_runners(Ci::Runner.owned_or_instance_wide(user_project.id), params[:scope])
present paginate(runners), with: Entities::Runner
end
@@ -180,7 +180,7 @@ module API
end
def authenticate_show_runner!(runner)
- return if runner.is_shared || current_user.admin?
+ return if runner.instance_type? || current_user.admin?
forbidden!("No access granted") unless can?(current_user, :read_runner, runner)
end