from PLC.Parameter import Parameter, Mixed
from PLC.Persons import Person, Persons
from PLC.Sites import Site, Sites
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
class AdmGetPersonSites(Method):
"""
themselves and others at their sites.
"""
+ status = "deprecated"
+
+ roles = ['admin', 'pi', 'user', 'tech']
+
accepts = [
- PasswordAuth(),
+ Auth(),
Mixed(Person.fields['person_id'],
Person.fields['email'])
]
if not persons:
raise PLCInvalidArgument, "No such account"
- person = persons.values()[0]
+ person = persons[0]
# Authenticated function
assert self.caller is not None