Permission flag for disabling viewing of Wiki history
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.
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.
#2 Updated by Jon Evans over 14 years ago
- File view_wiki_history.diff added
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 14 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 14 years ago
- File wiki_history_needs_edit_permission.diff added
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.