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