summaryrefslogtreecommitdiff
path: root/addons/mail/mail_thread.py
diff options
context:
space:
mode:
authorParamjit Singh Sahota <psa@tinyerp.com>2013-04-11 18:05:37 +0530
committerParamjit Singh Sahota <psa@tinyerp.com>2013-04-11 18:05:37 +0530
commit5bbffbc39c899adb92d251a3c8ef7f06e39338a7 (patch)
treeaef9a405359c8b4a6330d54bc5b1bd88c01e09cc /addons/mail/mail_thread.py
parent7df8cdd0d69bf0a147c69278b3992e4d392d9901 (diff)
[IMP] Improved code and made the EDIT followers visible when 'Technical Features' are given and it is in 'DEBUG mode'.
bzr revid: psa@tinyerp.com-20130411123537-2wzb468o7o0dno8c
Diffstat (limited to 'addons/mail/mail_thread.py')
-rw-r--r--addons/mail/mail_thread.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index 603c77f6ede..879f991ddb3 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -152,6 +152,13 @@ class mail_thread(osv.AbstractModel):
res[id]['message_summary'] = "<span class='oe_kanban_mail_new' title='%s'><span class='oe_e'>9</span> %d %s</span>" % (title, res[id].pop('message_unread_count'), _("New"))
return res
+ def check_access_right(self, cr, uid, ids, context=None):
+ grp_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'group_no_one')
+ user_pid = self.pool.get('res.groups').read(cr, uid, grp_id[1], ['users'], context=context)['users']
+ if uid in user_pid:
+ return True
+ return False
+
def _get_subscription_data(self, cr, uid, ids, name, args, user_id=None, context=None):
""" Computes:
- message_subtype_data: data about document subtypes: which are