diff --git a/openerp/addons/base/ir/ir_http.py b/openerp/addons/base/ir/ir_http.py index a022bb0edec..01999ebb9ec 100644 --- a/openerp/addons/base/ir/ir_http.py +++ b/openerp/addons/base/ir/ir_http.py @@ -62,7 +62,6 @@ class ir_http(osv.AbstractModel): raise http.SessionExpiredException("Session expired") def _auth_method_none(self): - request.disable_db = True request.uid = None def _auth_method_public(self): diff --git a/openerp/http.py b/openerp/http.py index 8823f9ca9ce..94e49ba7731 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -72,29 +72,6 @@ def redirect_with_hash(url, code=303): return werkzeug.utils.redirect(url, code) return "" % url -def ensure_db(with_registry=False, redirect='/web/database/selector'): - db = request.params.get('db') - # if db not provided, use the session one - if not db: - db = request.session.db - - # if no database provided and no database in session, use monodb - if not db: - db = db_monodb(request.httprequest) - - # if no db can be found til here, send to the database selector - # the database selector will redirect to database manager if needed - if not db: - werkzeug.exceptions.abort(werkzeug.utils.redirect(redirect, 303)) - - # always switch the session to the computed db - if db != request.session.db: - request.session.logout() - request.session.db = db - - if with_registry: - request.disable_db = False - class WebRequest(object): """ Parent class for all OpenERP Web request types, mostly deals with initialization and setup of the request object (the dispatching itself has