summaryrefslogtreecommitdiff
path: root/addons/web/controllers/main.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2014-09-12 18:53:48 +0200
committerChristophe Simonis <chs@odoo.com>2014-09-12 18:53:48 +0200
commit56f2b7ae0f8c958ef78da7cf466e7908abcd29c6 (patch)
treed4e87cd25cea80059723fd61a72b3c4eaf86841a /addons/web/controllers/main.py
parentd3ba8a840d986a224281a2844ccabcbc8c41ffd4 (diff)
parentfdc62713a5ac7a4f084a911311150fc6b9fe4a21 (diff)
[MERGE] forward port of branch saas-3 up to fdc6271
Diffstat (limited to 'addons/web/controllers/main.py')
-rw-r--r--addons/web/controllers/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index eed5a7dcb87..0d5a4c0cc67 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -119,7 +119,7 @@ def ensure_db(redirect='/web/database/selector'):
abort_and_redirect(url_redirect)
# if db not provided, use the session one
- if not db:
+ if not db and http.db_filter([request.session.db]):
db = request.session.db
# if no database provided and no database in session, use monodb
@@ -545,6 +545,8 @@ class Home(http.Controller):
@http.route('/login', type='http', auth="none")
def login(self, db, login, key, redirect="/web", **kw):
+ if not http.db_filter([db]):
+ return werkzeug.utils.redirect('/', 303)
return login_and_redirect(db, login, key, redirect_url=redirect)
@http.route('/web/js/<xmlid>', type='http', auth="public")
@@ -1283,7 +1285,7 @@ class Binary(http.Controller):
'/logo',
'/logo.png',
], type='http', auth="none")
- def company_logo(self, dbname=None):
+ def company_logo(self, dbname=None, **kw):
# TODO add etag, refactor to use /image code for etag
uid = None
if request.session.db: