Skip to content
Extraits de code Groupes Projets
Valider 54afb1ba rédigé par ilya's avatar ilya
Parcourir les fichiers

Rolling assign_key into setup_person

parent e2772446
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -330,17 +330,13 @@ class User
end
def setup_person
assign_key
self.person.serialized_key = generate_key.export
self.person.email = email
self.person.save!
end
protected
def assign_key
self.person.serialized_key ||= generate_key.export
end
def generate_key
OpenSSL::PKey::RSA::generate 1024
end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter