diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-11-26 15:53:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-26 15:53:27 +0100 |
commit | 73faadad28b897cd61cc1d6c8bee47e7d72a51a1 (patch) | |
tree | fd3570cfa52aa1c31924b6d11af1257308f4db66 /app/models/account.rb | |
parent | db9aea34dead1b230e44b4235ff8af8100108b7f (diff) |
Redesign admin accounts index (#9340)
* Improve overview of accounts in admin UI - Display suspended status, role, last activity and IP prominently - Default to showing local accounts - Default to not showing suspended accounts * Remove unused strings * Fix tests * Allow filtering accounts by IP mask
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 593ee29f7..46d32a36e 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -123,6 +123,7 @@ class Account < ApplicationRecord scope :suspended, -> { where(suspended: true) } scope :without_suspended, -> { where(suspended: false) } scope :recent, -> { reorder(id: :desc) } + scope :bots, -> { where(actor_type: %w(Application Service)) } scope :alphabetic, -> { order(domain: :asc, username: :asc) } scope :by_domain_accounts, -> { group(:domain).select(:domain, 'COUNT(*) AS accounts_count').order('accounts_count desc') } scope :matches_username, ->(value) { where(arel_table[:username].matches("#{value}%")) } |