summaryrefslogtreecommitdiff
path: root/app/controllers/projects/commit_controller.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-02-09 12:13:58 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-02-09 12:13:58 -0500
commit7ea60fbfc872e5acc0cc444d442958990747c6b3 (patch)
treebd4a38293d5d03b5cf3842fab04562fe8b775739 /app/controllers/projects/commit_controller.rb
parenta52c5778bb9d95097cc965539731a2ef846c3ff0 (diff)
parent201fb4c7e3f9ab4265f87f548ae22bb4008015c9 (diff)
downloadgitlab-ce-7ea60fbfc872e5acc0cc444d442958990747c6b3.tar.gz
Merge remote-tracking branch 'dev/master' into 'master'
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 5a084e123a1..21f4d9f44ec 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
@@ -79,10 +79,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