This PR adds the `add_guest_to_context` decorator in order to provide a generic
way to extract the guest from a request. It will be used to unified guest
extraction from cookie/param based on its provenance (external livechat/public
page).
This is better than the `pre_dispatch` method since it can be applied to
specific routes instead of adding this logic to every request.
part of task-3332628
closesodoo/odoo#130052
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This PR prepares the ground for the one introducing guests
for livechat visitors. Since our SameSite cookie policy
is Lax, the cookie won't be send on unsafe cross site
requests thus another mechanism will be introduced to
retrieve the guest.
This PR abstracts the way the guest is retrieved in order
to ease this transition as much as possible by overriding
the `ir_http._pre_dispatch` method in order to inject the
guest in the context if any.
part of task-3332628
closesodoo/odoo#129039
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit focuses on removing all references to discuss.channel from
controllers of mail module.
In preparation of splitting discuss and mail modules.
Part of task-3265211
closesodoo/odoo#119523
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>