mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Slightly improved reviewable user display, plus link to admin if possible
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
class ReviewableUserSerializer < ReviewableSerializer
|
||||
|
||||
attributes :link_admin
|
||||
|
||||
payload_attributes(
|
||||
:username,
|
||||
:email,
|
||||
:name
|
||||
)
|
||||
|
||||
def link_admin
|
||||
scope.is_staff? && object.target.present?
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user