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

13 lines
231 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
module API
module Entities
class UserSafe < Grape::Entity
2021-12-07 22:27:20 +05:30
expose :id, :username
expose :name do |user|
2022-05-07 20:08:51 +05:30
user.redacted_name(options[:current_user])
2021-12-07 22:27:20 +05:30
end
2020-03-13 15:44:24 +05:30
end
end
end