[IMP] mail: in case of creation, still check creation access rights for subscription

bzr revid: mat@openerp.com-20140206120109-6h2vz1ulu33t1509
This commit is contained in:
Martin Trigaux 2014-02-06 13:01:09 +01:00
parent 922836d8cd
commit 5ebcb64c34
1 changed files with 3 additions and 1 deletions

View File

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