From 370be6caa8a366774fba15d09fb03ee4d923b861 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 24 Jul 2013 11:09:04 +0200 Subject: keeping the pgp_key accessors for User so views still work --- users/app/models/user.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'users/app') diff --git a/users/app/models/user.rb b/users/app/models/user.rb index f78f290..0a89f7c 100644 --- a/users/app/models/user.rb +++ b/users/app/models/user.rb @@ -87,6 +87,26 @@ class User < CouchRest::Model::Base Ticket.for_user(self).limit(count).all #defaults to having most recent updated first end + # DEPRECATED + # + # Please set the key on the identity directly + # WARNING: This will not be serialized with the user record! + # It is only a workaround for the key form. + def public_key=(value) + identity.set_key(:pgp, value) + end + + # DEPRECATED + # + # Please access identity.keys[:pgp] directly + def public_key + identity.keys[:pgp] + end + + def identity + @identity ||= Identity.for(self) + end + protected ## -- cgit v1.2.3