[FIX] website: dashboard should correctly check user groups
Probably to backport.
This commit is contained in:
committed by
Yannick Tivisse
parent
2bbfce88d0
commit
a3301757f0
@@ -9,8 +9,8 @@ class WebsiteBackend(http.Controller):
|
||||
|
||||
@http.route('/website/fetch_dashboard_data', type="json", auth='user')
|
||||
def fetch_dashboard_data(self, date_from, date_to):
|
||||
has_group_system = request.env['res.users'].has_group('base.group_system')
|
||||
has_group_designer = request.env['res.users'].has_group('website.group_website_designer')
|
||||
has_group_system = request.env.user.has_group('base.group_system')
|
||||
has_group_designer = request.env.user.has_group('website.group_website_designer')
|
||||
if has_group_system:
|
||||
apps_data = dict((app['name'], app) for app in request.env['ir.module.module'].sudo().search_read(
|
||||
['|', ('name', 'ilike', 'website'), ('application', '=', True)],
|
||||
|
||||
Reference in New Issue
Block a user