diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-08-24 14:21:30 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-09-05 12:18:31 +0200 |
commit | 64855c8e30c53004b2e2c2a65f131f8ab7efa41c (patch) | |
tree | 2f9a4b4a6ae80847e1f88f068faa7ecb297d0535 /app/models/gpg_key.rb | |
parent | 508ff17b3405a4e2275fa137bd7322b728db8ed4 (diff) | |
download | gitlab-ce-64855c8e30c53004b2e2c2a65f131f8ab7efa41c.tar.gz |
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 |