This is done in order to enable the tour service only for the superuser. Commit6ef1644a7bchanged the meaning of `is_admin` to achieve this but broke the fact that some features of the debug manager are available to admin and not only to the superuser. Anyway a `is_admin` key should mean that the user is in the admin group. We could have checked client side that the uid is equal to 1 but adding a `is_superuser` key is more elegant and easier to grep. Also fix the only occurence of a uid check in the weblcient. This reverts commit6ef1644a7b.
12 lines
340 B
Python
12 lines
340 B
Python
from openerp import models
|
|
from openerp.http import request
|
|
|
|
class Http(models.AbstractModel):
|
|
_inherit = 'ir.http'
|
|
|
|
def session_info(self):
|
|
result = super(Http, self).session_info()
|
|
if result['is_superuser']:
|
|
result['web_tours'] = request.env['web_tour.tour'].get_consumed_tours()
|
|
return result
|