summaryrefslogtreecommitdiff
path: root/lib/api/entities/user.rb
blob: 4aa5c9b7236fed5cd098a5e25f855ff32733eb3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module API
  module Entities
    class User < UserBasic
      include UsersHelper
      expose :created_at, if: ->(user, opts) { Ability.allowed?(opts[:current_user], :read_user_profile, user) }
      expose :bio, :bio_html, :location, :public_email, :skype, :linkedin, :twitter, :website_url, :organization, :job_title
      expose :work_information do |user|
        work_information(user)
      end
    end
  end
end