odoo/odoo#189226

Created by fw-bot
Merged at 953d3b0488f45364a48a5b72d9c43549dfdd4959

Statuses:

label
odoo-dev:18.0-16.0-mail-access-tde-N4CR-fw
head
a04cfbf94d6401e8db0d321159fc29060372eb53
merged
1 year ago by Marketing, Thibault Delavallee (tde)
odoo/odoo
16.0 #186394
17.0 #189120
saas-17.2 #189181
saas-17.4 #189202
18.0 #189226
saas-18.2
saas-18.3
saas-18.4
19.0
master #189253

[FW][IMP] test_mail: make access tests independent from discuss models

Improve access related tests for mail.message and their sub models. Currently
tests are dependent on discuss.channel model, and not always written in a
clear way. Understanding the purpose of each test is not crystal clear.

We now use a test model with simple rules, defined in test_mail addon. It
allows to simulate models with

  • public access;
  • portal access;
  • internal access;
  • admin access;

using ACLs and ir.rules. Tests are rewritten to be more concise and precise
and use new models.

This is done in stable to keep coherency in tests codebase. It also eases
writing bugfixes as tests won't have to be modified during forward port
process. Finally it allows to backport improvements or fixes in later
versions if it applies to previous versions.

task-4320561

Forward-Port-Of: #189202
Forward-Port-Of: #186394