Merge remote-tracking branch 'origin/pycurl' into planetlab-4_0-branch
[plcapi.git] / trunk / PLC / Methods / AdmSetPersonEnabled.py
1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Persons import Person, Persons
5 from PLC.Auth import Auth
6 from PLC.Methods.UpdatePerson import UpdatePerson
7
8 class AdmSetPersonEnabled(UpdatePerson):
9     """
10     Deprecated. See UpdatePerson.
11     """
12
13     status = "deprecated"
14
15     accepts = [
16         Auth(),
17         Mixed(Person.fields['person_id'],
18               Person.fields['email']),
19         Person.fields['enabled']
20         ]
21
22     def call(self, auth, person_id_or_email, enabled):
23         return UpdatePerson.call(self, auth, person_id_or_email, {'enabled': enabled})