about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-03-16 23:12:59 +0100
committerClaire <claire.github-309c@sitedethib.com>2023-03-16 23:12:59 +0100
commit193250556cb4e6b1b3e2f9bd1ac023b290176fd4 (patch)
tree3bd6148ff028b8fe089cae9d805a7e587eaeec11 /app/models
parentf5daa20f2a90098c9d689c5ec9d95ce9887b3a33 (diff)
parent681dcd3fa35e886a21853ca829ff1be7f220e83a (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `README.md`:
  Upstream changed their README, we have our own.
  Kept ours.
- `app/helpers/application_helper.rb`:
  Minor code style fix upstream, on a line that is different in glitch-soc
  due to the different theming system.
  Applied the code style fix to our own code.
- `app/views/settings/preferences/appearance/show.html.haml`:
  Code style fix on a line next to lines exclusive to glitch-soc.
  Applied upstream changes.
- `yarn.lock`:
  Upstream updated a dependency textually close to a glitch-soc-only
  dependency.
  Updated the dependency like upstream did.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/backup.rb2
-rw-r--r--app/models/status.rb10
2 files changed, 1 insertions, 11 deletions
diff --git a/app/models/backup.rb b/app/models/backup.rb
index bec3cbfe5..dca06eb58 100644
--- a/app/models/backup.rb
+++ b/app/models/backup.rb
@@ -18,6 +18,6 @@
 class Backup < ApplicationRecord
   belongs_to :user, inverse_of: :backups
 
-  has_attached_file :dump
+  has_attached_file :dump, s3_permissions: 'private'
   validates_attachment_content_type :dump, content_type: /\Aapplication/
 end
diff --git a/app/models/status.rb b/app/models/status.rb
index d053dea44..bf102120e 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -237,16 +237,6 @@ class Status < ApplicationRecord
     public_visibility? || unlisted_visibility?
   end
 
-  def translatable?
-    translate_target_locale = I18n.locale.to_s.split(/[_-]/).first
-
-    distributable? &&
-      content.present? &&
-      language != translate_target_locale &&
-      TranslationService.configured? &&
-      TranslationService.configured.supported?(language, translate_target_locale)
-  end
-
   alias sign? distributable?
 
   def with_media?