summaryrefslogtreecommitdiff
path: root/app/controllers/projects/wikis_controller.rb
diff options
context:
space:
mode:
authorHiroyuki Sato <h-sato@ruby-dev.jp>2017-03-04 23:03:14 +0900
committerHiroyuki Sato <sathiroyuki@gmail.com>2017-03-08 18:42:50 +0900
commita5521bad4012a9eea21cb067271c8ec1810c6d8c (patch)
tree3544226812c93e9abfcaceafd939fc4a168ecd61 /app/controllers/projects/wikis_controller.rb
parente78a366925553a1268f8dc6e0d57342053a3240a (diff)
downloadgitlab-ce-a5521bad4012a9eea21cb067271c8ec1810c6d8c.tar.gz
Prevent concurrent editing wiki
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r--app/controllers/projects/wikis_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb
index 2d8064c9878..d27af79e003 100644
--- a/app/controllers/projects/wikis_controller.rb
+++ b/app/controllers/projects/wikis_controller.rb
@@ -56,6 +56,9 @@ class Projects::WikisController < Projects::ApplicationController
else
render 'edit'
end
+ rescue WikiPage::PageChangedError
+ @conflict = true
+ render 'edit'
end
def create
@@ -125,6 +128,6 @@ class Projects::WikisController < Projects::ApplicationController
end
def wiki_params
- params[:wiki].slice(:title, :content, :format, :message)
+ params[:wiki].slice(:title, :content, :format, :message, :last_commit_sha)
end
end