mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 08:03:40 +08:00
187b0bfb43
* 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
|