UX: Slightly improved reviewable user display, plus link to admin if possible

This commit is contained in:
Robin Ward
2019-04-03 17:07:24 -04:00
parent 3b581de3b8
commit a4ff593506
5 changed files with 44 additions and 5 deletions

View File

@@ -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