Merge pull request #33351 from akhilnarang/fix-dashboard-chart-permission-query

fix(dashboard_chart): check for `Group By` chart type as well in permission query
This commit is contained in:
Akhil Narang 2025-07-16 15:26:55 +05:30 committed by GitHub
commit 6c47ed2fa7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,7 +56,7 @@ def get_permission_query_conditions(user):
or `tabDashboard Chart`.`module` is NULL""".format(allowed_modules=",".join(allowed_modules))
return f"""
((`tabDashboard Chart`.`chart_type` in ('Count', 'Sum', 'Average')
((`tabDashboard Chart`.`chart_type` in ('Count', 'Sum', 'Average', 'Group By')
and {doctype_condition})
or
(`tabDashboard Chart`.`chart_type` = 'Report'