mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00:00
Fix ACL during check of uploads
This commit is contained in:
parent
1acdb1d046
commit
b9f4f51d9d
@ -424,11 +424,12 @@ module BulkImport
|
|||||||
fake_upload.url = upload["url"]
|
fake_upload.url = upload["url"]
|
||||||
path = add_multisite_prefix(store.get_path_for_upload(fake_upload))
|
path = add_multisite_prefix(store.get_path_for_upload(fake_upload))
|
||||||
|
|
||||||
file_exists =
|
|
||||||
if store.external?
|
if store.external?
|
||||||
store.object_from_path(path).exists?
|
obj = store.object_from_path(path)
|
||||||
|
file_exists = obj.exists?
|
||||||
|
obj.acl.put(acl: "public-read") if file_exists
|
||||||
else
|
else
|
||||||
File.exist?(File.join(store.public_dir, path))
|
file_exists = File.exist?(File.join(store.public_dir, path))
|
||||||
end
|
end
|
||||||
|
|
||||||
if file_exists
|
if file_exists
|
||||||
|
Loading…
x
Reference in New Issue
Block a user