-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
class AddRoleToPerson(Method):
"""
Grants the specified role to the person.
-
+
PIs can only grant the tech and user roles to users and techs at
their sites. Admins can grant any role to any user.
if role['role_id'] not in person['role_ids']:
person.add_role(role)
- self.event_objects = {'Person': [person['person_id']],
- 'Role': [role['role_id']]}
- self.message = "Role %d granted to person %d" % \
+ self.event_objects = {'Person': [person['person_id']],
+ 'Role': [role['role_id']]}
+ self.message = "Role %d granted to person %d" % \
(role['role_id'], person['person_id'])
return 1