django-chartjs icon indicating copy to clipboard operation
django-chartjs copied to clipboard

Chart display permission

Open AliPolat opened this issue 3 years ago • 0 comments

Hi,

In order to display or not to display the chart for the current user, I overwrite the get_data method of BaseLineChartView class such as :

def get_data(self): """If not authorized, do not display chart""" if not self.request.user.is_superuser: return False

And this works and chart is not displayed as intended. But is there any other better practice for permission management?

Thank You

AliPolat avatar Oct 24 '21 18:10 AliPolat