[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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user