From 2770e285358a8ae1e39cc7f594e1ccf8cfa417c3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 18 Nov 2011 16:31:17 +0000 Subject: [PATCH] Do not show section edit links for wiki page history (#2222). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7830 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/wiki_controller.rb | 1 + app/views/wiki/_content.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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}) %>
-- 2.39.5