discourse/app/serializers/similar_admin_user_serializ...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
269 B
Ruby
Raw Normal View History

# 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