diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-29 12:37:02 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-29 12:37:02 +0200 |
commit | 4a071fa46ae78886061bcaa245d1bf3dd934cb03 (patch) | |
tree | f5d3a6e5860102e7bcb8e62ce5109245a28adb2d /lib/api/helpers.rb | |
parent | 4449aaf8ab53bf7c05cf138d833afcb5fcd0db9c (diff) | |
download | gitlab-ci-4a071fa46ae78886061bcaa245d1bf3dd934cb03.tar.gz |
API: create build
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 4 |
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. # |