summaryrefslogtreecommitdiff
path: root/lib/api/v3/runners.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/v3/runners.rb')
-rw-r--r--lib/api/v3/runners.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/v3/runners.rb b/lib/api/v3/runners.rb
index faa265f3314..c6d9957d452 100644
--- a/lib/api/v3/runners.rb
+++ b/lib/api/v3/runners.rb
@@ -51,6 +51,7 @@ module API
helpers do
def authenticate_delete_runner!(runner)
return if current_user.admin?
+
forbidden!("Runner is shared") if runner.is_shared?
forbidden!("Runner associated with more than one project") if runner.projects.count > 1
forbidden!("No access granted") unless user_can_access_runner?(runner)