[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.
This commit is contained in:
Denis Ledoux
2015-11-24 11:59:15 +01:00
parent 3d864c14d8
commit 8d305ba9cd
+1 -1
View File
@@ -19,7 +19,7 @@ class MassMailController(http.Controller):
return response
@http.route(['/mail/mailing/<int:mailing_id>/unsubscribe'], type='http', auth='none', website=True)
@http.route(['/mail/mailing/<int:mailing_id>/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():