diff options
author | Rubén Dávila <ruben@gitlab.com> | 2017-09-27 19:45:19 -0500 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2017-10-05 08:25:27 -0500 |
commit | 9b4990a4d71b057f0fec14399cd1f2a421901963 (patch) | |
tree | e6e522b10f17325d0a8fcc86a2020210f285086b /app/models/gpg_key.rb | |
parent | a41e7e0105e238161ba697ebf26d8554ae59d295 (diff) | |
download | gitlab-ce-9b4990a4d71b057f0fec14399cd1f2a421901963.tar.gz |
Associate GgpSignature with GpgKeySubkey if comes from a subkey
Additionally we're delegating missing method calls on GpgKeySubkey to
GpgKey since most of the info required when verifying a signature is
found on GpgKey which is the parent of GpgKeySubkey
Diffstat (limited to 'app/models/gpg_key.rb')
-rw-r--r-- | app/models/gpg_key.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/app/models/gpg_key.rb b/app/models/gpg_key.rb index 6d3537b6fcf..ed09b44027c 100644 --- a/app/models/gpg_key.rb +++ b/app/models/gpg_key.rb @@ -40,17 +40,6 @@ class GpgKey < ActiveRecord::Base after_commit :update_invalid_gpg_signatures, on: :create after_create :generate_subkeys - def self.find_with_subkeys(fingerprint) - keys_table = arel_table - subkeys_table = GpgKeySubkey.arel_table - - condition = keys_table[:primary_keyid].eq(fingerprint).or( - subkeys_table[:keyid].eq(fingerprint) - ) - - joins(:subkeys).where(condition).first - end - def primary_keyid super&.upcase end |