Olivier Dony e1ed2c6ddc [FIX] mail: visibility rules for channel notifications
Avoid raising an access denied error for messages that
the user has indeed be notified about.

The issue arose when a message posted on a document inaccessible
to the user was notified to one of the channels the user
is subscribed to.

The access control logic on messages relies on 2 heuristics
to grant read access to a message:
 a. either the user was notified about the messages, by being
    a follower of the document, or a subscriber of a channel
    following the document (in that case the user can see the
    message but not the document)
 b. or the user has read access to the document on which the
    message is posted (in that case the user can see both
    the message and the document)

Case `a.` sometimes fail to match when a message got notified
to several channels including one the user was not subscribed
to. Depending on the order of the returned rows in the SQL
query, the "foreign" channels could shadow the channels of
the user, making `a.` a non-match.

If case `b.` did not match either, the user would have the
`read` access denied, even though the message was visible by
the `search()` method.

The fix explicitly makes case `a.` match if the user was
notified in *at least* one channel.
This was not done through a change of the SQL query ORDER,
for readability reasons.
2016-04-25 18:22:44 +02:00
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, 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.

If you are a developer you may type the following command at your terminal:

wget -O- https://raw.githubusercontent.com/odoo/odoo/9.0/odoo.py | python

Then follow the developer tutorials

For Odoo employees

To add the odoo-dev remote use this command:

$ ./odoo.py setup_git_dev

To fetch odoo merge pull requests refs use this command:

$ ./odoo.py setup_git_review
S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%