Ravi Gohil (OpenERP) has proposed merging
lp:~openerp-dev/openobject-server/6.1-opw-578621-rgo into
lp:openobject-server/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
Related bugs:
Bug #922024 in OpenERP Server: "config parameter --no-database-list error"
https://bugs.launchpad.net/openobject-server/+bug/922024
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-578621-rgo/+merge/122219
Hello,
If we run server with option --no-database-list and try to connect to server
using GTK-Client and using netrpc, client will show message saying 'Could not
connect to server !' and won't allow to connect, but we would be able to do so
using xmlrpc.
After investingating the issue, I found that, with --no-database-list option,
'AccessDenied' exception is raised from(server/openerp/service/web_services.py,
line#319) and with xmlrpc, it is handled at (server/openerp/wsgi/core.py,
line#133) by setting faultCode as 'AccessDenied' which is passed to GTK-Client
and GTK-Client handles this faultCode(by checking, if e.faultCode ==
'AccessDenied') and returns None.
But in case of netrpc, after raising AccessDenied, a string is returned as
'AccessDenied Access denied.' by server(file
server/openerp/service/netrpc_server.py, line#99) and this string will be set
as faultCode by GTK-Client(file client/bin/tiny_socket.py, line#108), and this
fault code isn't handled by GTK-Client and will not return any thing.
So, on the basis of my above investigation, I fixed this issue by passing
proper faultCode from server to client.
Kindly review the fix.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-578621-rgo/+merge/122219
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-server/6.1-opw-578621-rgo.
=== modified file 'openerp/service/netrpc_server.py'
--- openerp/service/netrpc_server.py 2012-01-24 17:30:17 +0000
+++ openerp/service/netrpc_server.py 2012-08-31 09:40:50 +0000
@@ -96,7 +96,7 @@
if isinstance(e, openerp.exceptions.AccessError):
return 'warning -- AccessError\n\n' + str(e)
if isinstance(e, openerp.exceptions.AccessDenied):
- return 'AccessDenied ' + str(e)
+ return 'AccessDenied'
return openerp.tools.exception_to_unicode(e)
class TinySocketServerThread(threading.Thread,netsvc.Server):
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp