diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-07 14:43:58 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-07 14:43:58 +0200 |
commit | e52de6771f6bf9629fc85213b94ec60721354e80 (patch) | |
tree | 7e4e8bd6b502376ae51bd3098dc501bf8da0743f /app/controllers/ci | |
parent | c0b79a751c8cbf676900956b14b70edd5dca5010 (diff) | |
download | gitlab-ce-e52de6771f6bf9629fc85213b94ec60721354e80.tar.gz |
Remove Continuous Integration from project menu
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/ci')
-rw-r--r-- | app/controllers/ci/projects_controller.rb | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb index adb913a783f..5484ae643a6 100644 --- a/app/controllers/ci/projects_controller.rb +++ b/app/controllers/ci/projects_controller.rb @@ -1,27 +1,10 @@ module Ci class ProjectsController < Ci::ApplicationController - before_action :authenticate_user!, except: [:build, :badge, :show] - before_action :authenticate_public_page!, only: :show - before_action :project, only: [:build, :show, :badge, :toggle_shared_runners, :dumped_yaml] - before_action :authorize_access_project!, except: [:build, :badge, :show, :new] + before_action :authenticate_user!, except: [:build, :badge] + before_action :authorize_access_project!, except: [:badge] before_action :authorize_manage_project!, only: [:toggle_shared_runners, :dumped_yaml] - before_action :authenticate_token!, only: [:build] before_action :no_cache, only: [:badge] - protect_from_forgery except: :build - - layout 'ci/project', except: [:index] - - def show - @ref = params[:ref] - - @commits = @project.commits.reverse_order - if @ref - # unscope is required, because of default_scope defined in Ci::Build - builds = @project.builds.unscope(:select, :order).where(ref: @ref).select(:commit_id).distinct - @commits = @commits.where(id: builds) - end - @commits = @commits.page(params[:page]).per(20) - end + protect_from_forgery # Project status badge # Image with build status for sha or ref |