git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b455fb0
)
Slices should be able to make operations on themselves.
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Tue, 28 Aug 2007 16:55:33 +0000
(16:55 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Tue, 28 Aug 2007 16:55:33 +0000
(16:55 +0000)
api.py
patch
|
blob
|
history
diff --git
a/api.py
b/api.py
index
c3b980c
..
d1cf1ba
100644
(file)
--- a/
api.py
+++ b/
api.py
@@
-155,8
+155,7
@@
class APIRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHandler):
if not (target_rec and target_rec['type'].startswith('sliver.')):
raise xmlrpclib.Fault(102,
'Invalid argument: the first argument must be a sliver name.')
if not (target_rec and target_rec['type'].startswith('sliver.')):
raise xmlrpclib.Fault(102,
'Invalid argument: the first argument must be a sliver name.')
- if not caller_name in target_rec['delegations']:
- # or (caller_name == 'utah_elab_delegate' and target_name.startswith('utah_'))):
+ if not caller_name in (args[0], target_rec['delegations']):
raise xmlrpclib.Fault(108, 'Permission denied.')
result = method(target_rec, *args[1:])
else: result = method(*args)
raise xmlrpclib.Fault(108, 'Permission denied.')
result = method(target_rec, *args[1:])
else: result = method(*args)