Skip to content

Chart display permission #59

@AliPolat

Description

@AliPolat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions