diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-08-24 15:21:30 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-09-05 13:18:31 +0300 |
commit | 64855c8e30c53004b2e2c2a65f131f8ab7efa41c (patch) | |
tree | 2f9a4b4a6ae80847e1f88f068faa7ecb297d0535 /app/models/gpg_key.rb | |
parent | 508ff17b3405a4e2275fa137bd7322b728db8ed4 (diff) |
match the committer's email against the gpg key
the updated verification of a gpg signature requires the committer's
email to also match the user's and the key's emails.
Diffstat (limited to 'app/models/gpg_key.rb')
-rw-r--r-- | app/models/gpg_key.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/gpg_key.rb b/app/models/gpg_key.rb index 3df60ddc950..cb46ff8145d 100644 --- a/app/models/gpg_key.rb +++ b/app/models/gpg_key.rb @@ -73,6 +73,10 @@ class GpgKey < ActiveRecord::Base emails_with_verified_status.any? { |_email, verified| verified } end + def verified_and_belongs_to_email?(email) + emails_with_verified_status.any? { |key_email, verified| key_email == email && verified } + end + def update_invalid_gpg_signatures InvalidGpgSignatureUpdateWorker.perform_async(self.id) end |