diff options
author | Go MAEDA <maeda@farend.jp> | 2021-07-19 14:42:26 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-07-19 14:42:26 +0000 |
commit | 482656fb2c09e9e456a3e006ceaf78d0c6f33ee5 (patch) | |
tree | 616b059cb0a94297a0a079a4b53a9218cccf2e2f /test | |
parent | 8e4d71adc9ebcfa48d7fcff388cc68661c03eaa2 (diff) | |
download | redmine-482656fb2c09e9e456a3e006ceaf78d0c6f33ee5.tar.gz redmine-482656fb2c09e9e456a3e006ceaf78d0c6f33ee5.zip |
Allow non-admin users to see group members (#12795).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@21072 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/groups_controller_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/groups_controller_test.rb b/test/functional/groups_controller_test.rb index 976815209..efb588198 100644 --- a/test/functional/groups_controller_test.rb +++ b/test/functional/groups_controller_test.rb @@ -47,6 +47,9 @@ class GroupsControllerTest < Redmine::ControllerTest end def test_show + Role.anonymous.update! :users_visibility => 'all' + + @request.session[:user_id] = nil get(:show, :params => {:id => 10}) assert_response :success end @@ -70,6 +73,14 @@ class GroupsControllerTest < Redmine::ControllerTest assert_response 404 end + def test_show_group_that_is_not_visible_should_return_404 + Role.anonymous.update! :users_visibility => 'members_of_visible_projects' + + @request.session[:user_id] = nil + get :show, :params => {:id => 10} + assert_response 404 + end + def test_new get :new assert_response :success |