summaryrefslogtreecommitdiff
path: root/lib/api/runners.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-14 22:58:38 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-06-14 22:58:38 +0800
commit1b8f52d9206bdf19c0dde04505c4c0b1cf46cfbe (patch)
tree51c00d356df437f2120312f1770806b5c45ac929 /lib/api/runners.rb
parentcbd6ca6985c1a7eefcfa5b3ca170fdf1865aee45 (diff)
downloadgitlab-ce-1b8f52d9206bdf19c0dde04505c4c0b1cf46cfbe.tar.gz
Avoid enabling locked runners. Give 403 in this case
Diffstat (limited to 'lib/api/runners.rb')
-rw-r--r--lib/api/runners.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb
index 2d09b6193d9..3ae228d61d8 100644
--- a/lib/api/runners.rb
+++ b/lib/api/runners.rb
@@ -163,6 +163,7 @@ module API
def authenticate_enable_runner!(runner)
forbidden!("Runner is shared") if runner.is_shared?
+ forbidden!("Runner is locked") if runner.locked?
return if current_user.is_admin?
forbidden!("No access granted") unless user_can_access_runner?(runner)
end