Is there a way to access the flask principal in order to execute some code conditionally?
In a functiod, I'd like to do something like:
def load_some_stuff():
if <user is an admin>:
load_report_data()
#more code, render template etc...
then in the template:
{% if report_data %}
// report rendering code goes here
{% endif %}