Browse Source

Merge pull request #117 from Tecnativa/9.0-mail_tracking_portal_rule

[FIX] mail_tracking: Add access to portal/public user to his own email trackings
pull/119/head
Pedro M. Baeza 8 years ago
committed by GitHub
parent
commit
60ea3860c6
  1. 3
      mail_tracking/__openerp__.py
  2. 2
      mail_tracking/security/ir.model.access.csv
  3. 16
      mail_tracking/security/mail_tracking_email_security.xml

3
mail_tracking/__openerp__.py

@ -5,7 +5,7 @@
{
"name": "Email tracking",
"summary": "Email tracking system for all mails sent",
"version": "9.0.2.0.1",
"version": "9.0.2.1.0",
"category": "Social Network",
"website": "http://www.tecnativa.com",
"author": "Tecnativa, "
@ -19,6 +19,7 @@
],
"data": [
"data/tracking_data.xml",
"security/mail_tracking_email_security.xml",
"security/ir.model.access.csv",
"views/assets.xml",
"views/mail_tracking_email_view.xml",

2
mail_tracking/security/ir.model.access.csv

@ -1,4 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_mail_tracking_email_group_public","mail_tracking_email group_public","model_mail_tracking_email","base.group_public",1,0,0,0
"access_mail_tracking_email_group_portal","mail_tracking_email group_portal","model_mail_tracking_email","base.group_portal",1,0,0,0
"access_mail_tracking_email_group_user","mail_tracking_email group_user","model_mail_tracking_email","base.group_user",1,0,0,0
"access_mail_tracking_event_group_user","mail_tracking_event group_user","model_mail_tracking_event","base.group_user",1,0,0,0
"access_mail_tracking_email_group_system","mail_tracking_email group_system","model_mail_tracking_email","base.group_system",1,1,1,1

16
mail_tracking/security/mail_tracking_email_security.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo>
<record model="ir.rule" id="mail_tracking_email_portal_public_rule">
<field name="name">mail_tracking_email: portal/public: read access on my email trackings</field>
<field name="model_id" ref="model_mail_tracking_email"/>
<field name="domain_force">[('partner_id', '=', user.partner_id.id)]</field>
<field name="groups" eval="[(4, ref('base.group_portal')), (4, ref('base.group_public'))]"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="perm_write" eval="False"/>
</record>
</odoo>
Loading…
Cancel
Save