X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FAdmGetPersonRoles.py;h=024b93cee59267fea14d680e8a9c50dd4b18a420;hb=a74854dd38cb742b8fdc0d0cda7fff738a95312c;hp=16cc9bc25a27cd6d93be16a9d26a179fdf49d160;hpb=682e1251201c658ef45e38b0761fe79e787f2e3e;p=plcapi.git diff --git a/PLC/Methods/AdmGetPersonRoles.py b/PLC/Methods/AdmGetPersonRoles.py index 16cc9bc..024b93c 100644 --- a/PLC/Methods/AdmGetPersonRoles.py +++ b/PLC/Methods/AdmGetPersonRoles.py @@ -2,7 +2,7 @@ from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Persons import Person, Persons -from PLC.Auth import PasswordAuth +from PLC.Auth import Auth class AdmGetPersonRoles(Method): """ @@ -26,7 +26,7 @@ class AdmGetPersonRoles(Method): roles = ['admin', 'pi', 'user', 'tech'] accepts = [ - PasswordAuth(), + Auth(), Mixed(Person.fields['person_id'], Person.fields['email']) ] @@ -39,7 +39,7 @@ class AdmGetPersonRoles(Method): if not persons: raise PLCInvalidArgument, "No such account" - person = persons.values()[0] + person = persons[0] # Authenticated function assert self.caller is not None