mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Support private attachments when using S3 storage (#7677)
* Support private uploads in S3 * Use localStore for local avatars * Add job to update private upload ACL on S3 * Test multisite paths * update ACL for private uploads in migrate_to_s3 task
This commit is contained in:
@@ -285,12 +285,11 @@ describe UploadsController do
|
||||
|
||||
context "prevent anons from downloading files" do
|
||||
it "returns 404 when an anonymous user tries to download a file" do
|
||||
skip("this only works when nginx/apache is asset server") if Discourse::Application.config.public_file_server.enabled
|
||||
upload = upload_file("small.pdf", "pdf")
|
||||
delete "/session/#{user.username}.json"
|
||||
|
||||
SiteSetting.prevent_anons_from_downloading_files = true
|
||||
get upload.url
|
||||
get "/uploads/#{site}/#{upload.sha1}.#{upload.extension}"
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user