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:
ba2b681
)
- move assertion to right place
author
Mark Huang
<mlhuang@cs.princeton.edu>
Tue, 19 Sep 2006 19:03:47 +0000
(19:03 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Tue, 19 Sep 2006 19:03:47 +0000
(19:03 +0000)
PLC/Methods/AdmUpdateNode.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/AdmUpdateNode.py
b/PLC/Methods/AdmUpdateNode.py
index
e5391af
..
109e0af
100644
(file)
--- a/
PLC/Methods/AdmUpdateNode.py
+++ b/
PLC/Methods/AdmUpdateNode.py
@@
-53,12
+53,12
@@
class AdmUpdateNode(Method):
node = nodes.values()[0]
+ # Authenticated function
+ assert self.caller is not None
+
# If we are not an admin, make sure that the caller is a
# member of the site at which the node is located.
if 'admin' not in self.caller['roles']:
- # Authenticated function
- assert self.caller is not None
-
if node['site_id'] not in self.caller['site_ids']:
raise PLCPermissionDenied, "Not allowed to delete nodes from specified site"