Add `sensitized` to Admin::Account serializer (fix #19148) (#20094)

* Add `sensitized` to Admin::Account serializer (fix #19148)

* remove whitespace, please linter
remotes/1705712285054221092/tmp_refs/heads/main^2
trwnh 2022-11-08 10:15:54 -06:00 committed by GitHub
parent 89e1974f30
commit c374729225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,7 @@
class REST::Admin::AccountSerializer < ActiveModel::Serializer
attributes :id, :username, :domain, :created_at,
:email, :ip, :role, :confirmed, :suspended,
:silenced, :disabled, :approved, :locale,
:silenced, :sensitized, :disabled, :approved, :locale,
:invite_request
attribute :created_by_application_id, if: :created_by_application?
@ -32,6 +32,10 @@ class REST::Admin::AccountSerializer < ActiveModel::Serializer
object.silenced?
end
def sensitized
object.sensitized?
end
def confirmed
object.user_confirmed?
end