From 7c24da2867720f04286612711b48f25602303b6f Mon Sep 17 00:00:00 2001 From: Antonio Espinosa Date: Mon, 24 Oct 2016 13:35:45 +0200 Subject: [PATCH] Add access to portal/public user to his own email trackings --- mail_tracking/__manifest__.py | 1 + mail_tracking/security/ir.model.access.csv | 2 ++ .../security/mail_tracking_email_security.xml | 16 ++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 mail_tracking/security/mail_tracking_email_security.xml diff --git a/mail_tracking/__manifest__.py b/mail_tracking/__manifest__.py index acb11080..2581eab1 100644 --- a/mail_tracking/__manifest__.py +++ b/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", diff --git a/mail_tracking/security/ir.model.access.csv b/mail_tracking/security/ir.model.access.csv index ab17dc33..2e66abea 100644 --- a/mail_tracking/security/ir.model.access.csv +++ b/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 diff --git a/mail_tracking/security/mail_tracking_email_security.xml b/mail_tracking/security/mail_tracking_email_security.xml new file mode 100644 index 00000000..3928ff7f --- /dev/null +++ b/mail_tracking/security/mail_tracking_email_security.xml @@ -0,0 +1,16 @@ + + + + + + mail_tracking_email: portal/public: read access on my email trackings + + [('partner_id', '=', user.partner_id.id)] + + + + + + +