From 8d305ba9cdff0e11f91acf357ae3eefbebff78a3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 24 Nov 2015 11:20:11 +0100 Subject: [PATCH] [FIX] mass_mailing: /unsubscribe controller must be auth='public' Rendering a website template with auth='none' has as side-effect to render the website template as sudo, therefore display "Administrator" instead of "Sign in" when the user is not signed in in the website user menu, as well as other issues, e.g. records browsed as sudo while it's not required. --- addons/mass_mailing/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mass_mailing/controllers/main.py b/addons/mass_mailing/controllers/main.py index d1e3b5a7657..2696ff2a43c 100644 --- a/addons/mass_mailing/controllers/main.py +++ b/addons/mass_mailing/controllers/main.py @@ -19,7 +19,7 @@ class MassMailController(http.Controller): return response - @http.route(['/mail/mailing//unsubscribe'], type='http', auth='none', website=True) + @http.route(['/mail/mailing//unsubscribe'], type='http', auth='public', website=True) def mailing(self, mailing_id, email=None, res_id=None, **post): mailing = request.env['mail.mass_mailing'].sudo().browse(mailing_id) if mailing.exists():