Skip to content

Commit

Permalink
[IMP] mail_drop_target: introduce group to control mailing_trace mode…
Browse files Browse the repository at this point in the history
…l access
  • Loading branch information
ajaniszewska-dev committed Sep 11, 2024
1 parent 13f3fe7 commit 93f0102
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mail_drop_target/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
"category": "Discuss",
"website": "https://github.com/OCA/social",
"summary": "Attach emails to Odoo by dragging them from your desktop",
"depends": ["mail"],
"depends": ["mail","mass_mailing"],
"external_dependencies": {"python": ["extract_msg", "cryptography<37"]},
"data": ["views/res_config_settings_views.xml"],
"data": [
"security/groups.xml",
"security/ir.model.access.csv",
"views/res_config_settings_views.xml"
],
"assets": {
"web.assets_backend": [
"mail_drop_target/static/src/js/file_uploader.esm.js",
Expand Down
10 changes: 10 additions & 0 deletions mail_drop_target/security/groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" ?>
<odoo>
<record model="res.groups" id="group_mailing_drop_mail">
<field name="name">Drop email in chatter</field>
<field
name="users"
eval="[(4, ref('base.group_user'))]"
/>
</record>
</odoo>
2 changes: 2 additions & 0 deletions mail_drop_target/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_mailing_trace_user,mailing.trace.user,mass_mailing.model_mailing_trace,mail_drop_target.group_mailing_drop_mail,1,1,1,1

0 comments on commit 93f0102

Please sign in to comment.