Feature #1154
closed
Permission flag for disabling viewing of Wiki history
Added by Jon Evans over 16 years ago.
Updated almost 16 years ago.
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
Attached is a patch implementing this feature.
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.
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.
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.
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
- Category changed from Permissions and roles to Wiki
- Status changed from New to Closed
- Target version set to 0.8
- Resolution set to Fixed
Also available in: Atom
PDF