- # check permission : it not admin, is the user affiliated with the right person
- if 'admin' not in self.caller['roles']:
- # check caller is affiliated with this person's person
- if not self.call.can_update(person):
- raise PLCPermissionDenied, "Not a member of the person's persons: %s"%person['person_ids']
+ persons = Persons (self.api, person_tag['person_id'])
+ if not persons:
+ raise PLCInvalidArgument("No such person %d"%person_tag['person_id'])
+ person=persons[0]