git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5a6c964
)
- fix accidental modification of class variable
author
Mark Huang
<mlhuang@cs.princeton.edu>
Thu, 7 Sep 2006 23:47:55 +0000
(23:47 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Thu, 7 Sep 2006 23:47:55 +0000
(23:47 +0000)
PLC/Methods/AdmGetNodes.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/AdmGetNodes.py
b/PLC/Methods/AdmGetNodes.py
index
c38b8d4
..
e7ca17f
100644
(file)
--- a/
PLC/Methods/AdmGetNodes.py
+++ b/
PLC/Methods/AdmGetNodes.py
@@
-44,15
+44,17
@@
class AdmGetNodes(Method):
# Authenticated function
assert self.caller is not None
# Authenticated function
assert self.caller is not None
+ valid_fields = dict(self.return_fields)
+
# Remove admin only fields
if 'admin' not in self.caller['roles']:
for key in ['boot_nonce', 'key', 'session', 'root_person_ids']:
# Remove admin only fields
if 'admin' not in self.caller['roles']:
for key in ['boot_nonce', 'key', 'session', 'root_person_ids']:
- del
self.return
_fields[key]
+ del
valid
_fields[key]
# Make sure that only valid fields are specified
if return_fields is None:
# Make sure that only valid fields are specified
if return_fields is None:
- return_fields =
self.return
_fields
- elif filter(lambda field: field not in
self.return
_fields, return_fields):
+ return_fields =
valid
_fields
+ elif filter(lambda field: field not in
valid
_fields, return_fields):
raise PLCInvalidArgument, "Invalid return field specified"
# Get node information
raise PLCInvalidArgument, "Invalid return field specified"
# Get node information