プロジェクト

全般

プロフィール

Vote #63142

完了

Permission flag for disabling viewing of Wiki history

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Wiki_1
対象バージョン:
開始日:
2008/05/01
期日:
進捗率:

0%

予定工数:
category_id:
1
version_id:
2
issue_org_id:
1154
author_id:
404
assigned_to_id:
0
comments:
6
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

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
--------------------------------------------------------------------------------
Feature added in r1815.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリWiki_1 にセット
  • 対象バージョン0.8_2 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0