From ca5231ba6d8aa1891f91f71bec5c81e557a0946e Mon Sep 17 00:00:00 2001
From: Tony Mack <tmack@cs.princeton.edu>
Date: Thu, 10 Sep 2009 22:23:43 +0000
Subject: [PATCH] add the key string to the person record before passing it to
 the sfa upcall

---
 PLC/Methods/AddPersonKey.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PLC/Methods/AddPersonKey.py b/PLC/Methods/AddPersonKey.py
index 79cdfc69..c7a8d242 100644
--- a/PLC/Methods/AddPersonKey.py
+++ b/PLC/Methods/AddPersonKey.py
@@ -44,7 +44,7 @@ class AddPersonKey(Method):
         if person['peer_id'] is not None:
             raise PLCInvalidArgument, "Not a local account"
 
-	# If we are not admin, make sure caller is adding a key to their account
+        # If we are not admin, make sure caller is adding a key to their account
         if 'admin' not in self.caller['roles']:
             if person['person_id'] != self.caller['person_id']:
                 raise PLCPermissionDenied, "You may only modify your own keys"
@@ -60,6 +60,7 @@ class AddPersonKey(Method):
                         (key['key_id'], person['person_id'])
 
         # sync with the geni db
+        person['key'] = key_fields['key']
         sfa = SFA(self.api)
         sfa.update_record(person, 'user') 
         
-- 
2.47.0