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
This commit is contained in:
parent
db9aea34de
commit
73faadad28
56 changed files with 47 additions and 266 deletions
|
@ -83,7 +83,6 @@ class User < ApplicationRecord
|
|||
scope :inactive, -> { where(arel_table[:current_sign_in_at].lt(ACTIVE_DURATION.ago)) }
|
||||
scope :active, -> { confirmed.where(arel_table[:current_sign_in_at].gteq(ACTIVE_DURATION.ago)).joins(:account).where(accounts: { suspended: false }) }
|
||||
scope :matches_email, ->(value) { where(arel_table[:email].matches("#{value}%")) }
|
||||
scope :with_recent_ip_address, ->(value) { where(arel_table[:current_sign_in_ip].eq(value).or(arel_table[:last_sign_in_ip].eq(value))) }
|
||||
|
||||
before_validation :sanitize_languages
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue