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:
Penar Musaraj
2019-06-05 23:27:24 -04:00
committed by Sam
parent e0c821ebb0
commit f00275ded3
13 changed files with 240 additions and 9 deletions

View File

@@ -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