Slices should be able to make operations on themselves.
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Tue, 28 Aug 2007 16:55:33 +0000 (16:55 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Tue, 28 Aug 2007 16:55:33 +0000 (16:55 +0000)
api.py

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 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)