Browse Source

Add access to portal/public user to his own email trackings

pull/108/head
Antonio Espinosa 8 years ago
committed by Damien Bouvy
parent
commit
7c24da2867
No known key found for this signature in database GPG Key ID: 1D0AB759B4B928E3
  1. 1
      mail_tracking/__manifest__.py
  2. 2
      mail_tracking/security/ir.model.access.csv
  3. 16
      mail_tracking/security/mail_tracking_email_security.xml

1
mail_tracking/__manifest__.py

@ -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