X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAddPersonKey.py;h=af701859c0ad3f84c857f629f8e2f876e4f9e51e;hb=4e770b3cf4e6b16150fd479ace9854eaee3399b6;hp=f7f18a624d5a9b3c91030af2322b227d68186c4f;hpb=77e4f177dfee85705c36298c3230b2e4a3e73467;p=plcapi.git diff --git a/PLC/Methods/AddPersonKey.py b/PLC/Methods/AddPersonKey.py index f7f18a6..af70185 100644 --- a/PLC/Methods/AddPersonKey.py +++ b/PLC/Methods/AddPersonKey.py @@ -1,4 +1,3 @@ -# $Id$ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed @@ -42,7 +41,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" @@ -52,9 +51,9 @@ class AddPersonKey(Method): person.add_key(key, commit = True) # Logging variables - self.event_objects = {'Person': [person['person_id']], - 'Key': [key['key_id']]} - self.message = 'Key %d added to person %d' % \ - (key['key_id'], person['person_id']) + self.event_objects = {'Person': [person['person_id']], + 'Key': [key['key_id']]} + self.message = 'Key %d added to person %d' % \ + (key['key_id'], person['person_id']) return key['key_id']