returns = Parameter(int, 'New key_id (> 0) if successful')
+ object_type = 'Person'
+
def call(self, auth, person_id_or_email, key_fields):
key_fields = dict(filter(can_update, key_fields.items()))
if not persons:
raise PLCInvalidArgument, "No such account"
person = persons[0]
- PLCCheckLocalPerson (person,"AddPersonKey")
+
+ 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 'admin' not in self.caller['roles']: