2020-01-26 13:08:47 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class UserPublic < Entities::User
|
|
|
|
expose :last_sign_in_at
|
|
|
|
expose :confirmed_at
|
|
|
|
expose :last_activity_on
|
|
|
|
expose :email
|
|
|
|
expose :theme_id, :color_scheme_id, :projects_limit, :current_sign_in_at
|
|
|
|
expose :identities, using: Entities::Identity
|
|
|
|
expose :can_create_group?, as: :can_create_group
|
|
|
|
expose :can_create_project?, as: :can_create_project
|
|
|
|
expose :two_factor_enabled?, as: :two_factor_enabled
|
|
|
|
expose :external
|
|
|
|
expose :private_profile
|
2021-09-16 02:09:50 -04:00
|
|
|
expose :commit_email
|
2020-01-26 13:08:47 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2020-02-17 07:09:20 -05:00
|
|
|
|
2021-05-11 17:10:21 -04:00
|
|
|
API::Entities::UserPublic.prepend_mod_with('API::Entities::UserPublic', with_descendants: true)
|