diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-24 09:44:38 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-09-24 09:44:38 +0200 |
commit | 64e12d5853b44c945a43a9ed7fc7046138884426 (patch) | |
tree | 7bd88d3a91dce481e1f96a4037a307e89abf0368 /app/controllers/projects/application_controller.rb | |
parent | ea583955252d04ad89819c335e77f811b3d3b3c7 (diff) | |
download | gitlab-ce-64e12d5853b44c945a43a9ed7fc7046138884426.tar.gz |
Add header for ci graphs and check that it is enabled
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r-- | app/controllers/projects/application_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb index ee88d49b400..e8af4c092da 100644 --- a/app/controllers/projects/application_controller.rb +++ b/app/controllers/projects/application_controller.rb @@ -1,6 +1,7 @@ class Projects::ApplicationController < ApplicationController before_action :project before_action :repository + before_action :ci_enabled, only: :ci layout 'project' def authenticate_user! @@ -25,4 +26,10 @@ class Projects::ApplicationController < ApplicationController ) end end + + private + + def ci_enabled + return render_404 unless @project.gitlab_ci? + end end |