mirror of
https://github.com/discourse/discourse.git
synced 2025-03-01 00:39:17 +00:00
When rebaking and in various other places for posts, we run through the uploads and call `update_secure_status` on each of them. However, if the secure status didn't change, we were still calling S3 to change the ACL, which would have been a noop in many cases and takes ~1 second per call, slowing things down a lot. Also, we didn't account for the s3_acls_enabled site setting being false here, and in the specs doing an assertion that `Discourse.store.update_ACL` is not called doesn't work; `Discourse.store` isn't a singleton, it re-initializes `FileStore::S3Store.new` every single time.