[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
This commit is contained in:
committed by
Jeremy Kersten
parent
4450495e9e
commit
a2f0dda366
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user