17ac041bfa2d92a11339e63016bce4696362b333
Before this commit, it was possible to post a message on a document the user has no access, thanks to a token. In addition to this token, if a hash (signed token with a partner id), the author_id of the message was forced. This commit change a little bit that logic by distinguish 2 cases: 1/ Token only: anyone with the token can post a message on the document. If the user is not logged (public with token), the author_id will be the customer of the document (or the public user). This case is moslty used for business document, through the portal or with the "share link" for instance. 2/ Signed token: user has no write access to the document, but can post a message on it. The user have to be logged, as the token is signed with its identifier. The goal here is to avoid leaking the access token's document to all visitors. This case is mostly used for public content, such as blog posts, slides, ... The token case was already existing. The second is now working with this commit. To do so, it was required to - move `_sign_token` from the portal mixin to mail.thread. - transfering 'pid' and 'hash' parameters from the controller to template to js widgets. This commit also change the `_message_post_helper` signature by making the 3 first parameters required, as to post a message you need at lease res_model, res_id and the message body. The optional argurments and kwargs are here to check the bypassing access rights mecanism. Task-1902304
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%