2020-01-26 18:08:47 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class User < UserBasic
|
2020-04-21 15:21:10 +00:00
|
|
|
include UsersHelper
|
2020-01-26 18:08:47 +00:00
|
|
|
expose :created_at, if: ->(user, opts) { Ability.allowed?(opts[:current_user], :read_user_profile, user) }
|
2020-03-03 09:07:54 +00:00
|
|
|
expose :bio, :location, :public_email, :skype, :linkedin, :twitter, :website_url, :organization, :job_title
|
2020-04-21 15:21:10 +00:00
|
|
|
expose :work_information do |user|
|
|
|
|
work_information(user)
|
|
|
|
end
|
2020-01-26 18:08:47 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|