From e41a29b0c381458f789d62cfeb9ad94920f78804 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 18 Sep 2015 10:19:08 +0200 Subject: Allow to disable GitLab CI --- lib/ci/api/helpers.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/ci/api/helpers.rb') diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb index e602cda81d6..13aa71f4630 100644 --- a/lib/ci/api/helpers.rb +++ b/lib/ci/api/helpers.rb @@ -3,6 +3,10 @@ module Ci module Helpers UPDATE_RUNNER_EVERY = 60 + def check_enable_flag! + not_found! unless current_application_settings.ci_enabled + end + def authenticate_runners! forbidden! unless params[:token] == GitlabCi::REGISTRATION_TOKEN end -- cgit v1.2.1