summaryrefslogtreecommitdiff
path: root/app/controllers/projects/commit_controller.rb
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-02-03 16:11:59 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-02-19 13:14:50 -0500
commit34e26b8212954dba32165c39b63858658b82c0f0 (patch)
treee1f1e5f8032c94911f6be26fd79a8d258b68070e /app/controllers/projects/commit_controller.rb
parent006089f97219825b2ec9406c0f2abfb3b67ca68f (diff)
downloadgitlab-ce-34e26b8212954dba32165c39b63858658b82c0f0.tar.gz
Add button to revert commit on Commit detail page.
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 36951b91372..96cb9761f3b 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -2,6 +2,8 @@
#
# Not to be confused with CommitsController, plural.
class Projects::CommitController < Projects::ApplicationController
+ include CreatesCommit
+
# Authorize
before_action :require_non_empty_project
before_action :authorize_download_code!, except: [:cancel_builds, :retry_builds]
@@ -9,6 +11,7 @@ class Projects::CommitController < Projects::ApplicationController
before_action :authorize_read_commit_status!, only: [:builds]
before_action :commit
before_action :define_show_vars, only: [:show, :builds]
+ before_action :authorize_edit_tree!, only: [:revert]
def show
apply_diff_view_cookie!
@@ -55,6 +58,10 @@ class Projects::CommitController < Projects::ApplicationController
render layout: false
end
+ def revert
+
+ end
+
private
def commit