From a2f0dda366a9dc08fbd4a2348575dbc407e022f6 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Wed, 13 Jul 2016 13:42:00 +0200 Subject: [PATCH] [FIX] website_portal: redirect to login for '/my' controller Current issue without this patch: On a bare database, install `website_portal` and go to `/my/home` logged out. You get to an empty page where you can see Public User's details. Expected behavior with this patch: User should be redirected to the login page. Additional notes: - Other submodules (`website_portal_sale` and `website_project_issue`) were actually implementing this, so that is removed BTW and relies in base module's now sensible behavior. This commit closes #12775 --- addons/website_portal/controllers/main.py | 2 +- addons/website_portal_sale/controllers/main.py | 2 +- addons/website_project_issue/controllers/main.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/website_portal/controllers/main.py b/addons/website_portal/controllers/main.py index 87ba93a68b0..1204a75c93b 100644 --- a/addons/website_portal/controllers/main.py +++ b/addons/website_portal/controllers/main.py @@ -6,7 +6,7 @@ from openerp.tools.translate import _ class website_account(http.Controller): - @http.route(['/my', '/my/home'], type='http', auth="public", website=True) + @http.route(['/my', '/my/home'], type='http', auth="user", website=True) def account(self, **kw): partner = request.env.user.partner_id diff --git a/addons/website_portal_sale/controllers/main.py b/addons/website_portal_sale/controllers/main.py index fc88ce8125c..275e58b049c 100644 --- a/addons/website_portal_sale/controllers/main.py +++ b/addons/website_portal_sale/controllers/main.py @@ -9,7 +9,7 @@ from openerp.addons.website_portal.controllers.main import website_account class website_account(website_account): - @http.route(['/my/home'], type='http', auth="user", website=True) + @http.route() def account(self, **kw): """ Add sales documents to main account page """ response = super(website_account, self).account() diff --git a/addons/website_project_issue/controllers/main.py b/addons/website_project_issue/controllers/main.py index 4c15b60761b..cc48a11bb7c 100644 --- a/addons/website_project_issue/controllers/main.py +++ b/addons/website_project_issue/controllers/main.py @@ -6,7 +6,7 @@ from openerp.http import request class WebsiteAccount(website_account): - @http.route(['/my', '/my/home'], type='http', auth="user", website=True) + @http.route() def account(self): response = super(WebsiteAccount, self).account() user = request.env.user