[FIX] mail: replaced a superuser_id by a classic read with uid on partner in mail_group and mail_thread; fixed access rigths definition in portal that are not necessary.
bzr revid: tde@openerp.com-20120918101423-pizn2tyrwta5o93n
This commit is contained in:
parent
b7eb8f20c4
commit
33f60023e8
|
@ -42,7 +42,7 @@ class ir_ui_menu(osv.osv):
|
|||
following. Access are done using SUPERUSER_ID to avoid access
|
||||
rights issues for an internal back-end algorithm. """
|
||||
ids = super(ir_ui_menu, self).search(cr, uid, args, offset=0, limit=None, order=order, context=context, count=False)
|
||||
partner_id = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context).partner_id.id
|
||||
partner_id = self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=context)['partner_id'][0]
|
||||
follower_obj = self.pool.get('mail.followers')
|
||||
for menu in self.browse(cr, uid, ids, context=context):
|
||||
if menu.mail_group_id:
|
||||
|
|
|
@ -139,7 +139,7 @@ class mail_thread(osv.AbstractModel):
|
|||
return res
|
||||
|
||||
def _search_unread(self, cr, uid, obj=None, name=None, domain=None, context=None):
|
||||
partner_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).partner_id.id
|
||||
partner_id = self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=context)['partner_id'][0]
|
||||
res = {}
|
||||
notif_obj = self.pool.get('mail.notification')
|
||||
notif_ids = notif_obj.search(cr, uid, [
|
||||
|
|
|
@ -4,6 +4,3 @@ access_widget_all,access.portal.widget.all,model_res_portal_widget,,1,0,0,0
|
|||
access_manager,access.portal.manager,model_res_portal,group_portal_manager,1,1,1,1
|
||||
access_widget_manager,access.portal.widget.manager,model_res_portal_widget,group_portal_manager,1,1,1,1
|
||||
access_mail_message,mail.message,mail.model_mail_message,group_portal_member,1,0,1,1
|
||||
access_mail_thread,mail.thread,mail.model_mail_thread,group_portal_member,1,0,0,0
|
||||
access_mail_followers,mail.followers,mail.model_mail_followers,group_portal_member,1,0,1,1
|
||||
access_mail_notification,mail.notification,mail.model_mail_notification,group_portal_member,1,0,1,0
|
||||
|
|
|
Loading…
Reference in New Issue