about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-11-19 01:30:29 -0600
committerDavid Yip <yipdw@member.fsf.org>2017-11-19 01:30:29 -0600
commitd083f7741a5996ee24bbdb7cd177e4db2ddfaead (patch)
tree7c950b5ee0f16b59b7acae023eadd949325fc2d7 /app/models
parentbcda3f85ce1473e9285299979a471525b2cd7034 (diff)
parent08deec4c84f00d241d60a6962806d5abe4638edd (diff)
Merge remote-tracking branch 'tootsuite/master'
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb8
-rw-r--r--app/models/form/admin_settings.rb2
2 files changed, 10 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index a4b8e1c0b..19186b697 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -42,6 +42,7 @@
 #  followers_url           :string           default(""), not null
 #  protocol                :integer          default("ostatus"), not null
 #  memorial                :boolean          default(FALSE), not null
+#  moved_to_account_id     :integer
 #
 
 class Account < ApplicationRecord
@@ -102,6 +103,9 @@ class Account < ApplicationRecord
   has_many :list_accounts, inverse_of: :account, dependent: :destroy
   has_many :lists, through: :list_accounts
 
+  # Account migrations
+  belongs_to :moved_to_account, class_name: 'Account'
+
   scope :remote, -> { where.not(domain: nil) }
   scope :local, -> { where(domain: nil) }
   scope :without_followers, -> { where(followers_count: 0) }
@@ -135,6 +139,10 @@ class Account < ApplicationRecord
     domain.nil?
   end
 
+  def moved?
+    moved_to_account_id.present?
+  end
+
   def acct
     local? ? username : "#{username}@#{domain}"
   end
diff --git a/app/models/form/admin_settings.rb b/app/models/form/admin_settings.rb
index 2b148c82b..6e9a2cd4b 100644
--- a/app/models/form/admin_settings.rb
+++ b/app/models/form/admin_settings.rb
@@ -24,6 +24,8 @@ class Form::AdminSettings
     :open_deletion=,
     :timeline_preview,
     :timeline_preview=,
+    :show_staff_badge,
+    :show_staff_badge=,
     :bootstrap_timeline_accounts,
     :bootstrap_timeline_accounts=,
     to: Setting