mirror of
https://github.com/discourse/discourse.git
synced 2025-02-10 21:34:50 +00:00
16 lines
219 B
Ruby
16 lines
219 B
Ruby
class ReviewableUserSerializer < ReviewableSerializer
|
|
|
|
attributes :link_admin
|
|
|
|
payload_attributes(
|
|
:username,
|
|
:email,
|
|
:name
|
|
)
|
|
|
|
def link_admin
|
|
scope.is_staff? && object.target.present?
|
|
end
|
|
|
|
end
|