diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 721ea28de..ba37a511f 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -85,6 +85,7 @@ class WikiController < ApplicationController end end @editable = editable? + @sections_editable = @editable && User.current.allowed_to?(:edit_wiki_pages, @page.project) && params[:version].nil? render :action => 'show' end diff --git a/app/views/wiki/_content.html.erb b/app/views/wiki/_content.html.erb index 0e747799d..60b6a7452 100644 --- a/app/views/wiki/_content.html.erb +++ b/app/views/wiki/_content.html.erb @@ -1,4 +1,4 @@
<%= textilizable content, :text, :attachments => content.page.attachments, - :edit_section_links => (content.is_a?(WikiContent) && @editable && User.current.allowed_to?(:edit_wiki_pages, @page.project) && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %> + :edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %>