[FIX] mail: update security rules

Since the introduction of `user_id` field, it makes sense to allow
those users to update/read/delete templates they have been assigned to.

task-3748816

closes odoo/odoo#162400

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
dane@odoo.com
2024-04-26 17:17:54 +00:00
parent e15c7e5442
commit b82a1ae38b
+2 -2
View File
@@ -234,9 +234,9 @@
</record>
<record id="mail_template_employee_rule" model="ir.rule">
<field name="name">Employees can only change their own templates</field>
<field name="name">Employees can only modify templates they have created or been assigned</field>
<field name="model_id" ref="model_mail_template"/>
<field name="domain_force">[('create_uid', '=', user.id)]</field>
<field name="domain_force">['|', ('create_uid', '=', user.id), ('user_id', '=', user.id)]</field>
<field name="groups" eval="[Command.link(ref('base.group_user'))]"/>
<field name="perm_create" eval="True"/>
<field name="perm_read" eval="False"/>