diff options
author | Robert Speicher <robert@gitlab.com> | 2016-02-08 23:33:44 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-02-08 23:33:44 +0000 |
commit | 201fb4c7e3f9ab4265f87f548ae22bb4008015c9 (patch) | |
tree | 9f203162f734ac6e214c9725b2479e5f3fccc021 /app/controllers/projects/commit_controller.rb | |
parent | 2ad872382b49d4802a9ea5e2c7e8773949d83b2a (diff) | |
parent | 311f407651e9ad1859bb0e9b6b9d6de79fde1a3d (diff) | |
download | gitlab-ce-201fb4c7e3f9ab4265f87f548ae22bb4008015c9.tar.gz |
Merge branch 'ci-permissions' into 'master'
Limit guest access to builds
Closes https://dev.gitlab.org/gitlab/gitlabhq/issues/2646
See merge request !1942
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index f5a169e5aa9..2bf367d2a25 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -4,10 +4,10 @@ class Projects::CommitController < Projects::ApplicationController # Authorize before_action :require_non_empty_project - before_action :authorize_download_code!, except: [:cancel_builds] - before_action :authorize_manage_builds!, only: [:cancel_builds] + before_action :authorize_download_code!, except: [:cancel_builds, :retry_builds] + before_action :authorize_update_build!, only: [:cancel_builds, :retry_builds] + before_action :authorize_read_commit_status!, only: [:builds] before_action :commit - before_action :authorize_manage_builds!, only: [:cancel_builds, :retry_builds] before_action :define_show_vars, only: [:show, :builds] def show @@ -77,10 +77,4 @@ class Projects::CommitController < Projects::ApplicationController @statuses = ci_commit.statuses if ci_commit end - - def authorize_manage_builds! - unless can?(current_user, :manage_builds, project) - return render_404 - end - end end |