2020-06-22 18:08:47 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class DeployKey < Entities::SSHKey
|
|
|
|
expose :key
|
2022-07-04 12:09:33 +00:00
|
|
|
expose :fingerprint, if: ->(key, _) { key.fingerprint.present? }
|
|
|
|
expose :fingerprint_sha256
|
2021-11-02 06:10:00 +00:00
|
|
|
|
|
|
|
expose :projects_with_write_access, using: Entities::ProjectIdentity, if: -> (_, options) { options[:include_projects_with_write_access] }
|
2020-06-22 18:08:47 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|