mirror of
https://github.com/discourse/discourse.git
synced 2025-02-23 08:18:39 +08:00

* 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.
15 lines
282 B
Ruby
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
|