プロジェクト

全般

プロフィール

Vote #66623

完了

New permission: view forum

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

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Permissions and roles_17
対象バージョン:
開始日:
2010/02/17
期日:
進捗率:

0%

予定工数:
category_id:
17
version_id:
119
issue_org_id:
4866
author_id:
12293
assigned_to_id:
1
comments:
9
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Currently it would be nice to be able to forbid viewing project forums to anonymous users.
A "Can view forums" checkbox in role permissions would suffice.


journals

This would solve several use-cases I think. Some quotes from #8618 (duplicating issue):

_Jochen Manz_ wrote:
> Most of the Permission do have a View XXXX checkbox, but not the forum. In my case i wanted to give a customer access to our redmine. In fact he is able to see our discussion forum which is not ment to be public. Its definetly a missing thing.

_mark B._ wrote:
> I've got the same problem. Work-around was to move the forum to another private project, but this is less than ideal, as it really should all be in the same project. Causes confusion and extra clicks.

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
The attached patch makes the "view messages" permission configurable, similar to #7068#note-5. This patch does not include translations as those are already present.
--------------------------------------------------------------------------------
Felix, thank you for the patch. It works fine but breaks some tests on my environment. Could you take a look?

{{collapse(ruby test/functional/boards_controller_test.rb)
<pre>
Run options: --seed 48663

# Running:

F.F....FF.F..FF.....

Finished in 1.551336s, 12.8921 runs/s, 30.9411 assertions/s.

1) Failure:
BoardsControllerTest#test_show [test/functional/boards_controller_test.rb:50]:
Expected response to be a <success>, but was <302>

2) Failure:
BoardsControllerTest#test_index [test/functional/boards_controller_test.rb:29]:
Expected response to be a <success>, but was <302>

3) Failure:
BoardsControllerTest#test_show_with_permission_should_display_the_new_message_form [test/functional/boards_controller_test.rb:92]:
Expected response to be a <success>, but was <403>

4) Failure:
BoardsControllerTest#test_show_should_display_sticky_messages_first [test/functional/boards_controller_test.rb:62]:
Expected response to be a <success>, but was <302>

5) Failure:
BoardsControllerTest#test_index_should_show_messages_if_only_one_board [test/functional/boards_controller_test.rb:42]:
Expected response to be a <success>, but was <302>

6) Failure:
BoardsControllerTest#test_show_atom [test/functional/boards_controller_test.rb:101]:
Expected response to be a <success>, but was <302>

7) Failure:
BoardsControllerTest#test_show_should_display_message_with_last_reply_first [test/functional/boards_controller_test.rb:81]:
Expected response to be a <success>, but was <302>

20 runs, 48 assertions, 7 failures, 0 errors, 0 skips
</pre>
}}

{{collapse(ruby test/functional/messages_controller_test.rb)
<pre>
Run options: --seed 480

# Running:

F............FFFF..

Finished in 2.647736s, 7.1759 runs/s, 18.5064 assertions/s.

1) Failure:
MessagesControllerTest#test_show [test/functional/messages_controller_test.rb:29]:
Expected response to be a <success>, but was <302>

2) Failure:
MessagesControllerTest#test_show_with_pagination [test/functional/messages_controller_test.rb:58]:
Expected response to be a <success>, but was <302>

3) Failure:
MessagesControllerTest#test_show_should_contain_reply_field_tags_for_quoting [test/functional/messages_controller_test.rb:37]:
Expected response to be a <success>, but was <403>

4) Failure:
MessagesControllerTest#test_post_new [test/functional/messages_controller_test.rb:113]:
Expected nil to not be nil.

5) Failure:
MessagesControllerTest#test_show_with_reply_permission [test/functional/messages_controller_test.rb:67]:
Expected response to be a <success>, but was <403>

19 runs, 49 assertions, 5 failures, 0 errors, 0 skips
</pre>
}}
--------------------------------------------------------------------------------
You are correct, the tests make the assumption that this permission is public. I have added the permission to the test fixtures and they work now.
--------------------------------------------------------------------------------
The patch works fine and passed all tests.
I think that delivering this feature along with #7068 makes permission control system of Redmine more consistent. Setting target version to 3.4.0.
--------------------------------------------------------------------------------
Committed, thanks for the patch.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,7555,Private forums
duplicates,Closed,8618,New Permission: View Forum
duplicates,Closed,2224,add view persmission for board

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

  • カテゴリPermissions and roles_17 にセット
  • 対象バージョン3.4.0_119 にセット

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

いいね!0
いいね!0