We\'re writing a web application in Flask + Jinja2 at work. The application has registered users which can access certain pages based on their roles. In order to achieve this o
I use Flask-Security, which ties a lot of the login/security modules together in a nice package. It comes with role management courtesy of Flask-Principal, which will allow you to do:
{% if current_user.has_role('admin') %}
- Manage Site
{% endif %}
You can see how that's implemented in the source, the current_user
proxy comes from Flask-Login