Feature #1154

Permission flag for disabling viewing of Wiki history

Added by Jon Evans over 9 years ago. Updated about 9 years ago.

Status:ClosedStart date:2008-05-01
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Wiki
Target version:0.8
Resolution:Fixed

Description

If a new permission flag was added which controlled whether or not the wiki history link was displayed, then it would be even easier to use Redmine as a general CMS system for a website.

I've configured a Redmine installation to act as a general company website. As well as adding projects for the actual projects we're undertaking, I've also added a "Project" representing the website itself. This project is mainly there to act as a Wiki for the site. "/" is redirected to the main Wiki page in exactly the same way as http://redmine.org/ actually loads http://redmine.org/wiki/redmine/ .

I don't want a history link on the page that would let users view previous edits I've made to the page, but that history would be useful to me and anyone else legitimately editing the page. So I'd like to untick a "Browse Wiki History" checkbox for the Anonymous and Non-member roles, so they could see the current versions of pages without being able to browse their histories.

view_wiki_history.diff Magnifier (5.24 KB) Jon Evans, 2008-05-01 16:23

view_wiki_history.diff Magnifier (6.13 KB) Jon Evans, 2008-05-01 16:40

wiki_history_needs_edit_permission.diff Magnifier (873 Bytes) Jon Evans, 2008-05-01 18:25

Associated revisions

Revision 1815
Added by Jean-Philippe Lang about 9 years ago

Adds a permission 'view wiki edits' so that wiki history can be hidden to certain users (#1154).
A migration automatically adds this permission to roles that were allowed to view wiki pages.

Revision 1844
Added by Nicolas Chuche about 9 years ago

r18551@gaspard (orig r1815): jplang | 2008-09-13 18:45:01 +0200
Adds a permission 'view wiki edits' so that wiki history can be hidden to certain users (#1154).
A migration automatically adds this permission to roles that were allowed to view wiki pages.

History

#1 Updated by Jon Evans over 9 years ago

Attached is a patch implementing this feature.

#2 Updated by Jon Evans over 9 years ago

Improved the patch - it now includes a migration which adds the view_wiki_history permission to all existing roles which already have the view_wiki_pages permission. This means that existing role capabilities will be unchanged unless you edit a role manually to remove the view_wiki_history permission.

#3 Updated by Carl Nygard over 9 years ago

Just a suggestion: wouldn't it be simpler just to display the history link if the user has edit permsission? From a certain point of view, history is only useful if you're looking to edit (or revert changes), so doing it that way would result in a much simpler patch.

#4 Updated by Jon Evans over 9 years ago

Carl,

It would be a much simpler patch to do it your way, just moving :history, :diff and :annotate actions from :view_wiki_pages to :edit_wiki_pages. However it's not quite the same, sometimes it would be useful to see what changed on a page even if you don't have edit permissions.

Anyway, both methods would work fine for my purposes, I've attached another patch which does it your way.

#5 Updated by Jean-Philippe Lang over 9 years ago

This patch removes the 'History' link from the wiki page, but:
  • users should not be allowed to see previous versions (eg: /wiki/foo/Bar?version=16)
  • users should not be able to see wiki edits in the activity view

#6 Updated by Jean-Philippe Lang about 9 years ago

  • Category changed from Permissions and roles to Wiki
  • Status changed from New to Closed
  • Target version set to 0.8
  • Resolution set to Fixed

Feature added in r1815.

Also available in: Atom PDF