From 3adab7ba8c71cd222e9f9b56cb50b8d7fdfe3ff8 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 15 Oct 2012 18:23:46 +0200 Subject: [IMP]: once bound, a session cannot be bound to another server bzr revid: chs@openerp.com-20121015162346-jwhctk988fftjsa4 --- addons/web/static/src/js/coresetup.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'addons/web/static/src/js/coresetup.js') diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 1f1112df2f2..cf533ed0b59 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -27,6 +27,12 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess * Setup a sessionm */ session_bind: function(origin) { + if (!_.isUndefined(this.origin)) { + if (this.origin === origin) { + return $.when(); + } + throw new Error('Session already bound to ' + this.origin); + } var self = this; this.setup(origin); instance.web.qweb.default_dict['_s'] = this.origin; -- cgit v1.2.3