summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-09-15 15:40:53 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-09-15 15:40:53 +0200
commit548169cfb57b27cca911d947e2aa6f4f7e6df004 (patch)
tree94e9d3793cd8738ca7428521518f7dc4f0a539e0 /lib/ci
parent551787ac5c12a502b46c819939b2fa11684a799c (diff)
downloadgitlab-ce-548169cfb57b27cca911d947e2aa6f4f7e6df004.tar.gz
Fix most of specs
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/api/helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb
index 3dfebc0cac1..23353c62885 100644
--- a/lib/ci/api/helpers.rb
+++ b/lib/ci/api/helpers.rb
@@ -14,7 +14,7 @@ module Ci
end
def authenticate_build_token!(build)
- forbidden! unless build_token_valid?
+ forbidden! unless build_token_valid?(build)
end
def runner_registration_token_valid?
@@ -23,7 +23,7 @@ module Ci
current_application_settings.runners_registration_token)
end
- def build_token_valid?
+ def build_token_valid?(build)
token = (params[BUILD_TOKEN_PARAM] || env[BUILD_TOKEN_HEADER]).to_s
# We require to also check `runners_token` to maintain compatibility with old version of runners