mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-05 00:44:53 +08:00
13 lines
269 B
Ruby
13 lines
269 B
Ruby
# frozen_string_literal: true
|
|
|
|
class SimilarAdminUserSerializer < AdminUserListSerializer
|
|
attributes :can_be_suspended, :can_be_silenced
|
|
|
|
def can_be_suspended
|
|
scope.can_suspend?(object)
|
|
end
|
|
|
|
def can_be_silenced
|
|
scope.can_silence_user?(object)
|
|
end
|
|
end
|