From 5ebcb64c34fd9e65da311ffdc050bf15ad035bef Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 6 Feb 2014 13:01:09 +0100 Subject: [PATCH] [IMP] mail: in case of creation, still check creation access rights for subscription bzr revid: mat@openerp.com-20140206120109-6h2vz1ulu33t1509 --- addons/mail/mail_thread.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index e7345fafb9b..0ae8f521cea 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -1203,7 +1203,9 @@ class mail_thread(osv.AbstractModel): if set(partner_ids) == set([user_pid]): try: self.check_access_rights(cr, uid, 'read') - if context.get('operation', '') != 'create': + if context.get('operation', '') == 'create': + self.check_access_rule(cr, uid, ids, 'create') + else: self.check_access_rule(cr, uid, ids, 'read') except (osv.except_osv, orm.except_orm): return False