diff options
Diffstat (limited to 'app/controllers/ci/projects_controller.rb')
-rw-r--r-- | app/controllers/ci/projects_controller.rb | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb index e8788955eba..7777aa18031 100644 --- a/app/controllers/ci/projects_controller.rb +++ b/app/controllers/ci/projects_controller.rb @@ -1,27 +1,11 @@ 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, :disabled] + before_action :project + 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] - skip_before_action :check_enable_flag!, only: [:disabled] - protect_from_forgery except: :build - - layout 'ci/project', except: [:index, :disabled] - - def disabled - end - - def show - @ref = params[:ref] - - @commits = @project.commits.reverse_order - @commits = @commits.where(ref: @ref) if @ref - @commits = @commits.page(params[:page]).per(20) - end + protect_from_forgery # Project status badge # Image with build status for sha or ref |