summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-12-01 15:27:17 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-12-01 15:27:17 +0000
commitdf9ff95f2bb80f53655bf0158d3b143fd4c6d35a (patch)
tree6e6fe36e74d4f70c440be713619ad86112202402 /test/functional
parente96d8038fc4008bf8d206855008e21da38bb7ced (diff)
downloadredmine-df9ff95f2bb80f53655bf0158d3b143fd4c6d35a.tar.gz
redmine-df9ff95f2bb80f53655bf0158d3b143fd4c6d35a.zip
Add tests for #37772.
Patch by Holger Just. git-svn-id: https://svn.redmine.org/redmine/trunk@21979 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/attachments_controller_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb
index cb82427cd..4839c612d 100644
--- a/test/functional/attachments_controller_test.rb
+++ b/test/functional/attachments_controller_test.rb
@@ -623,6 +623,22 @@ class AttachmentsControllerTest < Redmine::ControllerTest
assert_response 404
end
+ def test_download_all_with_invisible_journal
+ Project.find(1).update_column :is_public, false
+ Member.delete_all
+ @request.session[:user_id] = 2
+ User.current = User.find(2)
+ assert_not Journal.find(3).journalized.visible?
+ get(
+ :download_all,
+ :params => {
+ :object_type => 'journals',
+ :object_id => '3'
+ }
+ )
+ assert_response 403
+ end
+
def test_download_all_with_maximum_bulk_download_size_larger_than_attachments
with_settings :bulk_download_max_size => 0 do
@request.session[:user_id] = 2