From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- addons/mail/security/mail_security.xml | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 addons/mail/security/mail_security.xml (limited to 'addons/mail/security/mail_security.xml') diff --git a/addons/mail/security/mail_security.xml b/addons/mail/security/mail_security.xml new file mode 100644 index 00000000..6aef7841 --- /dev/null +++ b/addons/mail/security/mail_security.xml @@ -0,0 +1,74 @@ + + + + + + Mail.channel: access only public and joined groups + + + ['|', '|', +('public', '=', 'public'), +'&', ('public', '=', 'private'), ('channel_partner_ids', 'in', [user.partner_id.id]), +'&', ('public', '=', 'groups'), ('group_public_id', 'in', [g.id for g in user.groups_id])] + + + + + mail.channel.partner: write its own entries + + + ['|', '|', +('channel_id.public', '=', 'public'), +'&', ('channel_id.public', '=', 'private'), ('channel_id.channel_partner_ids', 'in', [user.partner_id.id]), +'&', ('channel_id.public', '=', 'groups'), ('channel_id.group_public_id', 'in', [g.id for g in user.groups_id])] + + + + + + + + mail.notifications: group_user: write its own entries + + + [('res_partner_id', '=', user.partner_id.id)] + + + + + + + mail.message.subtype: portal/public: read public subtypes + + [('internal', '=', False)] + + + + + mail.activity: user: write/unlink only (created or assigned) + + ['|', ('user_id', '=', user.id), ('create_uid', '=', user.id)] + + + + + + + + + White/Black List: moderators: moderated channels only + + [('channel_id.moderator_ids', 'in', user.id)] + + + + Mail Compose Message Rule + + [('create_uid', '=', user.id)] + + + + + + + -- cgit v1.2.3