diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-09-07 09:21:38 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-09-07 09:21:38 +0200 |
commit | e5f934ddf0aa4ef9efbf45751bc00bebff768d99 (patch) | |
tree | 322231d7d50704edf8da762b69ee22c9850f2ce3 /lib | |
parent | d967251fdc3826ad27d30e55258cfa4cdfd7c871 (diff) | |
parent | a6121a159c5305ea9faa95743a50babb23ab41cd (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/activitypub/collections_controller.rb`: Conflict caused because we have additional code to make sure pinned local-only toots don't get rendered on the ActivityPub endpoints. Ported upstream changes.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mastodon/media_cli.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mastodon/media_cli.rb b/lib/mastodon/media_cli.rb index 31135f7fc..5f4a414b1 100644 --- a/lib/mastodon/media_cli.rb +++ b/lib/mastodon/media_cli.rb @@ -67,6 +67,7 @@ module Mastodon when :s3 paperclip_instance = MediaAttachment.new.file s3_interface = paperclip_instance.s3_interface + s3_permissions = Paperclip::Attachment.default_options[:s3_permissions] bucket = s3_interface.bucket(Paperclip::Attachment.default_options[:s3_credentials][:bucket]) last_key = options[:start_after] @@ -87,7 +88,7 @@ module Mastodon record_map = preload_records_from_mixed_objects(objects) objects.each do |object| - object.acl.put(acl: 'public-read') if options[:fix_permissions] && !options[:dry_run] + object.acl.put(acl: s3_permissions) if options[:fix_permissions] && !options[:dry_run] path_segments = object.key.split('/') path_segments.delete('cache') |