whoami.html 1.96 KB
Newer Older
1
{% load static %}
2
3
{% load i18n %}

Enrico Zini's avatar
Enrico Zini committed
4
5
<div class="card">
  <div class="card-body">
6
  {% if request.signon_identities %}
7
    {% if request.user.is_authenticated %}
8

9
10
11
      {% blocktrans with visitor_a_link=request.user.a_link %}
      You are currently logged in, and recognized as {{visitor_a_link}}.
      {% endblocktrans %}
12

13
    {% else %}
14

15
16
17
18
      {% url 'dm_claim' as dm_claim_url %}
      {% blocktrans with request_user_username=request.user.username %}You
      are currently logged in, but not mapped to any person in the site.
      If you are a Debian Maintainer, you can try to correct the situation using the
urbec's avatar
urbec committed
19
      <a href="{{dm_claim_url}}">claim interface</a>.{% endblocktrans %}
20
21
22
23
24
25

      {% url 'public_newnm' as public_newnm_url %}
      {% blocktrans %}If you are not yet in the site,
      <a href="{{public_newnm_url}}">visit the 'Join the NM process' page</a>
      to create an entry for yourself.{% endblocktrans %}</p>

26
    {% endif %}
27

28
29
30
31
32
33
34
35
36
    <p>{% trans "You are logged in as:" %}</p>

    <ul>
    {% for identity in request.signon_identities.values %}
    <li>
      {% with identity.get_provider as provider %}
        {% if identity.picture %}
        <img class="personpic ml-auto" src="{{identity.picture}}"></img>
        {% elif provider.icon %}
37
        <img style="vertical-align: text-top; height: 1em" class="mr-2" src="{% static provider.icon %}"></img>
38
39
40
41
42
43
44
45
46
47
48
49
        {% else %}
        <span class="mr-2 fa fa-sign-in"></span>
        {% endif %}

        {% if identity.profile %}<a href="{{identity.profile}}">{% endif %}
          {{provider.label}}:
          {{identity.fullname}}{% if identity.username %} &lt;{{identity.username}}&gt;{% endif %}
        {% if identity.profile %}</a>{% endif %}
      {% endwith %}
    </li>
    {% endfor %}
    </ul>
50

51
  {% else %}
52
53
54
55

    {% blocktrans %}You are not currently logged in. See the
    <a href="https://wiki.debian.org/DebianSingleSignOn">Single Sign-On page</a>
    for details.{% endblocktrans %}
56

57
  {% endif %}
Enrico Zini's avatar
Enrico Zini committed
58
  </div>
59
</div>