diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-06-15 15:07:44 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 15:42:53 +0200 |
commit | e75ab064302bcec45a5953a636cc9f3295f2690c (patch) | |
tree | faba436451824130fa6ff97f9614afa1aeb7128e /app/models/user.rb | |
parent | 24671cd601e93133787ff9746fcacc3cf5d3fbf4 (diff) | |
download | gitlab-ce-e75ab064302bcec45a5953a636cc9f3295f2690c.tar.gz |
update invalid gpg signatures when email changes
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 5aebd36cf8a..791d099605d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -155,6 +155,7 @@ class User < ActiveRecord::Base before_validation :set_public_email, if: :public_email_changed? after_update :update_emails_with_primary_email, if: :email_changed? + after_update :update_invalid_gpg_signatures, if: :email_changed? before_save :ensure_authentication_token, :ensure_incoming_email_token before_save :ensure_user_rights_and_limits, if: :external_changed? after_save :ensure_namespace_correct @@ -513,6 +514,10 @@ class User < ActiveRecord::Base end end + def update_invalid_gpg_signatures + gpg_keys.each(&:update_invalid_gpg_signatures) + end + # Returns the groups a user has access to def authorized_groups union = Gitlab::SQL::Union |