summaryrefslogtreecommitdiff
path: root/addons/mail/mail_thread.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-12-12 13:55:18 +0100
committerThibault Delavallée <tde@openerp.com>2012-12-12 13:55:18 +0100
commit347d0e5b468cf042cb6ea431c367bbbd54bdb39b (patch)
tree61a784d734c2f43707cf0ddffc3a91dbe4284d81 /addons/mail/mail_thread.py
parent6f1f3b325d17b057c7cd6aba2d4a1b29c481f4c3 (diff)
[IMP] portal removed access rights of portal user on res_partner and derived tables. Updated several accesses to bypass the security issues. Updated portal tests to have a more complete test scenario.
bzr revid: tde@openerp.com-20121212125518-k0s07niojr8a1xtu
Diffstat (limited to 'addons/mail/mail_thread.py')
-rw-r--r--addons/mail/mail_thread.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index bb5d94843fc..ac2b0efb670 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -213,8 +213,11 @@ class mail_thread(osv.AbstractModel):
def create(self, cr, uid, vals, context=None):
""" Override to subscribe the current user. """
+ if context is None:
+ context = {}
thread_id = super(mail_thread, self).create(cr, uid, vals, context=context)
- self.message_subscribe_users(cr, uid, [thread_id], [uid], context=context)
+ if not context.get('mail_nosubscribe'):
+ self.message_subscribe_users(cr, uid, [thread_id], [uid], context=context)
return thread_id
def unlink(self, cr, uid, ids, context=None):