Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-10 15:42:55 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-16 11:52:28 +0300
commitc3f9d80a6e0950361e056ded4107015d3923f56d (patch)
tree91155d2ef99e8fd9feca798b1a6dd1d3f5519d9d /lib/api
parent18821b157dbf3a73637ab741e8154b5133ce0e72 (diff)
Rename User#ci_authorized_runners -> ci_owned_runners
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/runners.rb2
-rw-r--r--lib/api/v3/runners.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb
index db9cff80cf9..4f12aeac1fd 100644
--- a/lib/api/runners.rb
+++ b/lib/api/runners.rb
@@ -14,7 +14,7 @@ module API
use :pagination
end
get do
- runners = filter_runners(current_user.ci_authorized_runners, params[:scope], without: %w(specific shared))
+ runners = filter_runners(current_user.ci_owned_runners, params[:scope], without: %w(specific shared))
present paginate(runners), with: Entities::Runner
end
diff --git a/lib/api/v3/runners.rb b/lib/api/v3/runners.rb
index c6d9957d452..8a5c46805bd 100644
--- a/lib/api/v3/runners.rb
+++ b/lib/api/v3/runners.rb
@@ -58,7 +58,7 @@ module API
end
def user_can_access_runner?(runner)
- current_user.ci_authorized_runners.exists?(runner.id)
+ current_user.ci_owned_runners.exists?(runner.id)
end
end
end