diff options
Diffstat (limited to 'app/controllers/wiki_controller.rb')
-rw-r--r-- | app/controllers/wiki_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index de1931a0b..1dfb16640 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -62,10 +62,12 @@ class WikiController < ApplicationController def new @page = WikiPage.new(:wiki => @wiki, :title => params[:title]) - unless User.current.allowed_to?(:edit_wiki_pages, @project) && editable? + unless User.current.allowed_to?(:edit_wiki_pages, @project) render_403 + return end if request.post? + @page.title = '' unless editable? @page.validate if @page.errors[:title].blank? path = project_wiki_page_path(@project, @page.title) |