debian-mirror-gitlab/app/models/commit_signatures/ssh_signature.rb
2023-03-17 16:20:25 +05:30

23 lines
402 B
Ruby

# frozen_string_literal: true
module CommitSignatures
class SshSignature < ApplicationRecord
include CommitSignature
include SignatureType
belongs_to :key, optional: true
belongs_to :user, optional: true
def type
:ssh
end
def signed_by_user
user || key&.user
end
def key_fingerprint_sha256
super || key&.fingerprint_sha256
end
end
end