debian-mirror-gitlab/lib/api/entities/user_public.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
1.4 KiB
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
module API
module Entities
class UserPublic < Entities::User
2023-01-13 00:05:48 +05:30
expose :last_sign_in_at, documentation: { type: 'dateTime', example: '2015-09-03T07:24:01.670Z' }
expose :confirmed_at, documentation: { type: 'dateTime', example: '2015-09-03T07:24:01.670Z' }
expose :last_activity_on, documentation: { type: 'dateTime', example: '2015-09-03T07:24:01.670Z' }
expose :email, documentation: { type: 'string', example: 'john@example.com' }
expose :theme_id, documentation: { type: 'integer', example: 2 }
expose :color_scheme_id, documentation: { type: 'integer', example: 1 }
expose :projects_limit, documentation: { type: 'integer', example: 10 }
expose :current_sign_in_at, documentation: { type: 'dateTime', example: '2015-09-03T07:24:01.670Z' }
2020-03-13 15:44:24 +05:30
expose :identities, using: Entities::Identity
2023-01-13 00:05:48 +05:30
expose :can_create_group?, as: :can_create_group, documentation: { type: 'boolean', example: true }
expose :can_create_project?, as: :can_create_project, documentation: { type: 'boolean', example: true }
expose :two_factor_enabled?, as: :two_factor_enabled, documentation: { type: 'boolean', example: true }
2020-03-13 15:44:24 +05:30
expose :external
2023-01-13 00:05:48 +05:30
expose :private_profile, documentation: { type: 'boolean', example: :null }
2021-11-11 11:23:49 +05:30
expose :commit_email_or_default, as: :commit_email
2020-03-13 15:44:24 +05:30
end
end
end
2021-06-08 01:23:25 +05:30
API::Entities::UserPublic.prepend_mod_with('API::Entities::UserPublic', with_descendants: true)