git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- style nits, fix docs
[plcapi.git]
/
PLC
/
Methods
/
GetRoles.py
diff --git
a/PLC/Methods/GetRoles.py
b/PLC/Methods/GetRoles.py
index
084350f
..
7d7c264
100644
(file)
--- a/
PLC/Methods/GetRoles.py
+++ b/
PLC/Methods/GetRoles.py
@@
-2,7
+2,7
@@
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Roles import Role, Roles
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Roles import Role, Roles
-from PLC.Auth import
Password
Auth
+from PLC.Auth import Auth
class GetRoles(Method):
"""
class GetRoles(Method):
"""
@@
-12,16
+12,11
@@
class GetRoles(Method):
roles = ['admin', 'pi', 'user', 'tech']
accepts = [
roles = ['admin', 'pi', 'user', 'tech']
accepts = [
-
Password
Auth()
+ Auth()
]
returns = [Role.fields]
]
returns = [Role.fields]
+
def call(self, auth):
def call(self, auth):
-
- roles = Roles(self.api).values()
-
- #turn each role into a real dict
- roles = [dict(role) for role in roles]
-
- return roles
+ return Roles(self.api)