mirror of
https://github.com/wassname/flask-security.git
synced 2026-09-10 12:01:01 +08:00
First code commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{%- if current_user.is_authenticated() -%}
|
||||
<p>Hello {{ current_user.email }}</p>
|
||||
{%- endif %}
|
||||
<ul>
|
||||
<li><a href="{{ url_for('index') }}">Index</a></li>
|
||||
<li><a href="{{ url_for('profile') }}">Profile</a></li>
|
||||
{% if current_user.has_role('admin') -%}
|
||||
<li><a href="{{ url_for('admin') }}">Admin</a></li>
|
||||
{% endif -%}
|
||||
{% if current_user.has_role('admin') or current_user.has_role('editor') -%}
|
||||
<li><a href="{{ url_for('admin_or_editor') }}">Admin or Editor</a></li>
|
||||
{% endif -%}
|
||||
<li>
|
||||
{%- if current_user.is_authenticated() -%}
|
||||
<a href="{{ url_for('auth.logout') }}">Log out</a>
|
||||
{%- else -%}
|
||||
<a href="{{ url_for('login') }}">Log in</a>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
Reference in New Issue
Block a user