1# frozen_string_literal: true 2 3module API 4 module Entities 5 class UserPublic < Entities::User 6 expose :last_sign_in_at 7 expose :confirmed_at 8 expose :last_activity_on 9 expose :email 10 expose :theme_id, :color_scheme_id, :projects_limit, :current_sign_in_at 11 expose :identities, using: Entities::Identity 12 expose :can_create_group?, as: :can_create_group 13 expose :can_create_project?, as: :can_create_project 14 expose :two_factor_enabled?, as: :two_factor_enabled 15 expose :external 16 expose :private_profile 17 expose :commit_email_or_default, as: :commit_email 18 end 19 end 20end 21 22API::Entities::UserPublic.prepend_mod_with('API::Entities::UserPublic', with_descendants: true) 23