summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2017-11-16 04:58:10 -0800
committerazul <azul@riseup.net>2017-11-16 04:58:10 -0800
commit66ad2c7bd477b7d3f887aeede8963b1ec9d4c479 (patch)
treec911f020eb11d0e1342c96ae225cf2a4a6ca57df /app/models
parentf250a11b4fd98bb9f4ef50c501b72f5ae2a97d1d (diff)
parent1ce9a3355ee59181df0359ebb455efa9ef323bb6 (diff)
Merge branch 'fix/8798-key-errors' into 'master'
Fix/8798 key errors Closes #8798 See merge request leap/webapp!54
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index d77c61f..5a4111d 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -65,9 +65,6 @@ class Account
if attrs[:recovery_code_verifier].present?
user.update_attributes attrs.slice(:recovery_code_verifier, :recovery_code_salt)
end
- # TODO: move into identity controller
- key = update_pgp_key(attrs[:public_key])
- user.errors.set :public_key, key.errors.full_messages
user.save && save_identities
user.refresh_identity
end
@@ -129,15 +126,6 @@ class Account
@old_identity.destination = user.email_address # alias old -> new
end
- def update_pgp_key(key)
- PgpKey.new(key).tap do |key|
- if key.present? && key.valid?
- @new_identity ||= Identity.for(user)
- @new_identity.set_key(:pgp, key)
- end
- end
- end
-
def save_identities
@new_identity.try(:save) && @old_identity.try(:save)
end