diff options
| author | Christophe Simonis <christophe@tinyerp.com> | 2009-08-28 18:57:55 +0200 |
|---|---|---|
| committer | Christophe Simonis <christophe@tinyerp.com> | 2009-08-28 18:57:55 +0200 |
| commit | 59bcfa0f49b5377db4f2a66d33ad2c7bba6b3716 (patch) | |
| tree | 6741c491d0b21b00c534042053114e50954bef4e | |
| parent | bba48476eb281736fb948a1dd29c1a56a3bdc388 (diff) | |
| parent | 8714d5863f0e669f02d78cf2f73453195d7c82c0 (diff) | |
[MERGE]
bzr revid: christophe@tinyerp.com-20090828163729-slp5iosj2h3ajodt
bzr revid: christophe@tinyerp.com-20090828165755-zht8z9xnk4ckonfi
| -rw-r--r-- | bin/netsvc.py | 4 | ||||
| -rw-r--r-- | bin/osv/osv.py | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/bin/netsvc.py b/bin/netsvc.py index ea6513a5325..aadded32d7a 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -235,6 +235,8 @@ class OpenERPDispatcher: Logger().notifyChannel('%s' % title, LOG_DEBUG_RPC, pformat(msg)) def dispatch(self, service_name, method, params): + if service_name not in GROUPS['web-services']: + raise Exception('AccessDenied') try: self.log('service', service_name) self.log('method', method) @@ -280,7 +282,7 @@ class SSLSocket(object): return getattr(self.socket, name) class SimpleXMLRPCRequestHandler(GenericXMLRPCRequestHandler, SimpleXMLRPCServer.SimpleXMLRPCRequestHandler): - rpc_paths = map(lambda s: '/xmlrpc/%s' % s, SERVICES.keys()) + rpc_paths = map(lambda s: '/xmlrpc/%s' % s, GROUPS.get('web-services', {}).keys()) class SecureXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): def setup(self): diff --git a/bin/osv/osv.py b/bin/osv/osv.py index f6a364b7891..807ecad566d 100644 --- a/bin/osv/osv.py +++ b/bin/osv/osv.py @@ -86,7 +86,6 @@ class osv_pool(netsvc.Service): self._init = True self._init_parent = {} netsvc.Service.__init__(self, 'object_proxy', audience='') - self.joinGroup('web-services') self.exportMethod(self.obj_list) self.exportMethod(self.exec_workflow) self.exportMethod(self.execute) |
