X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAddPersonToSlice.py;h=1cee0301bd1ebca8cb2f94fd50e827c851733615;hb=f7ce7ce813d4c44502629820a3583f32a99a98f7;hp=b38e1113fbc5f82593e83b192b6230ed1318e1b8;hpb=9a608e111c7f8182f51753ea3f563ebc19eb4c71;p=plcapi.git diff --git a/PLC/Methods/AddPersonToSlice.py b/PLC/Methods/AddPersonToSlice.py index b38e111..1cee030 100644 --- a/PLC/Methods/AddPersonToSlice.py +++ b/PLC/Methods/AddPersonToSlice.py @@ -10,7 +10,7 @@ from PLC.Auth import Auth class AddPersonToSlice(Method): """ Adds the specified person to the specified slice. If the person is - already a member of the slice, no errors are returned. + already a member of the slice, no errors are returned. Returns 1 if successful, faults otherwise. """ @@ -48,16 +48,16 @@ class AddPersonToSlice(Method): # If we are not admin, make sure the caller is a PI # of the site associated with the slice - if 'admin' not in self.caller['roles']: + if 'admin' not in self.caller['roles']: if slice['site_id'] not in self.caller['site_ids']: raise PLCPermissionDenied, "Not allowed to add users to this slice" - if slice['slice_id'] not in person['slice_ids']: + if slice['slice_id'] not in person['slice_ids']: slice.add_person(person) # Logging variables - self.event_objects = {'Person': [person['person_id']], - 'Slice': [slice['slice_id']]} - self.object_ids = [slice['slice_id']] + self.event_objects = {'Person': [person['person_id']], + 'Slice': [slice['slice_id']]} + self.object_ids = [slice['slice_id']] return 1