2016-12-22 11:08:35 -05:00
|
|
|
class WebHookUserSerializer < UserSerializer
|
2018-01-21 18:09:26 -05:00
|
|
|
attributes :external_id
|
|
|
|
|
2016-12-22 11:08:35 -05:00
|
|
|
# remove staff attributes
|
|
|
|
def staff_attributes(*attrs)
|
|
|
|
end
|
2017-03-24 20:20:36 -04:00
|
|
|
|
|
|
|
def include_email?
|
|
|
|
scope.is_admin?
|
|
|
|
end
|
2018-01-21 18:09:26 -05:00
|
|
|
|
|
|
|
def include_external_id?
|
|
|
|
scope.is_admin? && object.single_sign_on_record
|
|
|
|
end
|
|
|
|
|
|
|
|
def external_id
|
|
|
|
object.single_sign_on_record.external_id
|
|
|
|
end
|
|
|
|
|
2016-12-22 11:08:35 -05:00
|
|
|
end
|