From: Tony Mack Date: Thu, 10 Sep 2009 22:23:43 +0000 (+0000) Subject: add the key string to the person record before passing it to the sfa upcall X-Git-Tag: PLCAPI-4.3-24~10 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=ca5231ba6d8aa1891f91f71bec5c81e557a0946e add the key string to the person record before passing it to the sfa upcall --- diff --git a/PLC/Methods/AddPersonKey.py b/PLC/Methods/AddPersonKey.py index 79cdfc6..c7a8d24 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')