From: Faiyaz Ahmed Date: Tue, 28 Aug 2007 16:55:33 +0000 (+0000) Subject: Slices should be able to make operations on themselves. X-Git-Tag: NodeManager-1.6-1~65 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=db1faaacf2d62a8febd8e0e2e41e6821d39287f7 Slices should be able to make operations on themselves. --- diff --git a/api.py b/api.py index c3b980c..d1cf1ba 100644 --- 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)