summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/wiki_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index fe53e63f2..7609323f4 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -31,8 +31,13 @@ class WikiController < ApplicationController
page_title = params[:page]
@page = @wiki.find_or_new_page(page_title)
if @page.new_record?
- edit
- render :action => 'edit' and return
+ if User.current.allowed_to?(:edit_wiki_pages, @project)
+ edit
+ render :action => 'edit'
+ else
+ render_404
+ end
+ return
end
@content = @page.content_for_version(params[:version])
if params[:export] == 'html'