From 616eaa4bccc9ad8b7e6c562321cc8c0c62e83209 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Tue, 14 Jan 2014 14:57:03 +0100 Subject: [PATCH] [FIX] compatibility with dbfilter_from_header [ADD] mention dbfilter_from_header in the module description --- auth_from_http_basic/__init__.py | 4 ++-- auth_from_http_basic/__openerp__.py | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/auth_from_http_basic/__init__.py b/auth_from_http_basic/__init__.py index 26fa1ad00..4a12fa791 100644 --- a/auth_from_http_basic/__init__.py +++ b/auth_from_http_basic/__init__.py @@ -19,14 +19,14 @@ # ############################################################################## from openerp.addons.web.http import WebRequest -from openerp.addons.web.controllers.main import db_list +from openerp.addons.web.controllers import main as web_main old_init = WebRequest.init def init(self, params): old_init(self, params) if self.httprequest.authorization and not self.session._login: - dbs = db_list(self) + dbs = web_main.db_list(self) self.session.authenticate( dbs and dbs[0], self.httprequest.authorization.username, diff --git a/auth_from_http_basic/__openerp__.py b/auth_from_http_basic/__openerp__.py index 461dd3385..2b38960bb 100644 --- a/auth_from_http_basic/__openerp__.py +++ b/auth_from_http_basic/__openerp__.py @@ -30,8 +30,11 @@ webserver handle authentication and pass the login information via HTTP headers to the application it proxies. This addon allows for this setup. Technically, it picks up the HTTP -Authorization header, extract a username and a password from that and tries to -login into the first database found in the database list. +Authorization header, extracts a username and a password and tries to login +into the first database found in the database list. + +If you have to set a specific database, possibly depending on the login +provided, use the addon dbfilter_from_header. """, "category" : "", "depends" : [