[FIX] im_livechat: ir.config_parameter must be read as superuser
As ir.config_parameter is restricted to employees in ACL, for security reasons
This commit is contained in:
parent
a01ce6a127
commit
fca2f5ce31
|
@ -107,7 +107,7 @@ class im_livechat_channel(osv.osv):
|
|||
res = {}
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
res[record.id] = env.get_template("include.html").render({
|
||||
"url": self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url'),
|
||||
"url": self.pool.get('ir.config_parameter').get_param(cr, openerp.SUPERUSER_ID, 'web.base.url'),
|
||||
"parameters": {"db":cr.dbname, "channel":record.id},
|
||||
})
|
||||
return res
|
||||
|
@ -115,7 +115,7 @@ class im_livechat_channel(osv.osv):
|
|||
def _web_page(self, cr, uid, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
res[record.id] = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url') + \
|
||||
res[record.id] = self.pool.get('ir.config_parameter').get_param(cr, openerp.SUPERUSER_ID, 'web.base.url') + \
|
||||
"/im_livechat/web_page?p=" + json.dumps({"db":cr.dbname, "channel":record.id})
|
||||
return res
|
||||
|
||||
|
|
Loading…
Reference in New Issue