discourse/app/serializers/similar_admin_user_serializer.rb
Bianca Nenciu 187b0bfb43
FEATURE: Show similar users when penalizing a user (#19334)
* FEATURE: Show similar users when penalizing a user

Moderators will be notified if other users with the same IP address
exist before penalizing a user.

* FEATURE: Allow staff to penalize multiple users

This allows staff members to suspend or silence multiple users belonging
to the same person.
2022-12-08 14:42:33 +02:00

15 lines
282 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