summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-10-29 12:37:02 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-10-29 12:37:02 +0200
commit4a071fa46ae78886061bcaa245d1bf3dd934cb03 (patch)
treef5d3a6e5860102e7bcb8e62ce5109245a28adb2d /lib/api/helpers.rb
parent4449aaf8ab53bf7c05cf138d833afcb5fcd0db9c (diff)
downloadgitlab-ci-4a071fa46ae78886061bcaa245d1bf3dd934cb03.tar.gz
API: create build
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 4bea5a2..28a3f2b 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -29,6 +29,10 @@ module API
forbidden! unless current_runner
end
+ def authenticate_project_token!(project)
+ forbidden! unless project.valid_token?(params[:project_token])
+ end
+
# Checks the occurrences of required attributes, each attribute must be present in the params hash
# or a Bad Request error is invoked.
#