Project

General

Profile

Actions

Feature #1154

closed

Permission flag for disabling viewing of Wiki history

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
Start date:
2008-05-01
Due date:
% Done:

0%

Estimated time:
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.


Files

view_wiki_history.diff (5.24 KB) view_wiki_history.diff Jon Evans, 2008-05-01 16:23
view_wiki_history.diff (6.13 KB) view_wiki_history.diff Jon Evans, 2008-05-01 16:40
wiki_history_needs_edit_permission.diff (873 Bytes) wiki_history_needs_edit_permission.diff Jon Evans, 2008-05-01 18:25
Actions #1

Updated by Jon Evans over 16 years ago

Attached is a patch implementing this feature.

Actions #2

Updated by Jon Evans over 16 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.

Actions #3

Updated by Carl Nygard over 16 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.

Actions #4

Updated by Jon Evans over 16 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.

Actions #5

Updated by Jean-Philippe Lang over 16 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
Actions #6

Updated by Jean-Philippe Lang about 16 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.

Actions

Also available in: Atom PDF