Debian Codegraph @

flask_security/templates/security/_menu.html

raw
1 {% if security.registerable or security.recoverable or security.confirmable or
2 security.unified_signin or security.two_factor or security.webauthn or security.change_username or
3 security.username_recovery %}
4 <hr>
5 <h2>{{ _fsdomain('Menu') }}</h2>
6 <menu>
7 {% if _fs_is_user_authenticated(current_user) %}
8 {# already authenticated user #}
9 <li class="fs-button">
10 <form action="{{ url_for_security('logout') }}" method="post" name="logout_form">
11 <button type="submit">Sign Out</button>
12 </form>
13 </li>
14 {% if security.changeable %}
15 <li>
16 <a href="{{ url_for_security('change_password') }}">{{ _fsdomain("Change Password") }}</a>
17 </li>
18 {% endif %}
19 {% if security.recoverable %}
20 <li>
21 <a href="{{ url_for_security('forgot_password') }}">{{ _fsdomain('Forgot password?') }}</a>
22 </li>
23 {% endif %}
24 {% if security.change_email %}
25 <li>
26 <a href="{{ url_for_security('change_email') }}">{{ _fsdomain("Change Registered Email") }}</a>
27 </li>
28 {% endif %}
29 {% if security.change_username %}
30 <li>
31 <a href="{{ url_for_security('change_username') }}">{{ _fsdomain("Change Username") }}</a>
32 </li>
33 {% endif %}
34 {% if security.two_factor %}
35 <li>
36 <a href="{{ url_for_security('two_factor_setup') }}">{{ _fsdomain("Two-Factor Setup") }}</a>
37 </li>
38 {% endif %}
39 {% if security.unified_signin %}
40 <li>
41 <a href="{{ url_for_security('us_setup') }}">{{ _fsdomain("Unified Signin Setup") }}</a>
42 </li>
43 {% endif %}
44 {% if security.webauthn %}
45 <li>
46 <a href="{{ url_for_security('wan_register') }}">{{ _fsdomain("Passkey Setup") }}</a>
47 </li>
48 {% endif %}
49 {% else %}
50 {% if not skip_login_menu %}
51 <li>
52 <a href="{{ url_for_security('login') }}{%- if 'next' in request.args -%}?next={{ request.args.next|urlencode }}{%- endif -%}">{{ _fsdomain('Login') }}</a>
53 </li>
54 {% endif %}
55 {% if security.unified_signin and not skip_login_menu %}
56 <li>
57 <a href="{{ url_for_security('us_signin') }}{%- if 'next' in request.args -%}?next={{ request.args.next|urlencode }}{%- endif -%}">{{ _fsdomain('Unified Sign In') }}</a>
58 </li>
59 {% endif %}
60 {% if security.registerable %}
61 <li>
62 <a href="{{ url_for_security('register') }}{%- if 'next' in request.args -%}?next={{ request.args.next|urlencode }}{%- endif -%}">{{ _fsdomain('Register') }}</a>
63 </li>
64 {% endif %}
65 {% if security.recoverable %}
66 <li>
67 <a href="{{ url_for_security('forgot_password') }}">{{ _fsdomain('Forgot password?') }}</a>
68 </li>
69 {% endif %}
70 {% if security.username_recovery %}
71 <li>
72 <a href="{{ url_for_security('recover_username') }}">{{ _fsdomain('Recover Username') }}</a>
73 </li>
74 {% endif %}
75 {% if security.confirmable %}
76 <li>
77 <a href="{{ url_for_security('send_confirmation') }}">{{ _fsdomain('Confirm account') }}</a>
78 </li>
79 {% endif %}
80 {% endif %}
81 </menu>
82 {% endif %}