canaille-globuzma/canaille/templates/oidc/user/consent_list.html

79 lines
3.8 KiB
HTML
Raw Normal View History

{% extends theme('base.html') %}
2020-09-17 10:01:21 +00:00
{% block style %}
<link href="/static/datatables/jquery.dataTables.min.css" rel="stylesheet">
<link href="/static/datatables/dataTables.semanticui.min.css" rel="stylesheet">
{% endblock %}
{% block script %}
<script src="/static/datatables/jquery.dataTables.min.js"></script>
<script src="/static/datatables/dataTables.semanticui.min.js"></script>
<script src="/static/js/users.js"></script>
{% endblock %}
{% block content %}
<div class="ui segment">
2021-12-20 22:57:27 +00:00
<h2 class="ui center aligned header">
2020-09-17 10:01:21 +00:00
<div class="content">
2021-12-20 22:57:27 +00:00
{{ _("My consents") }}
2020-09-17 10:01:21 +00:00
</div>
2021-12-20 22:57:27 +00:00
<div class="sub header">
{% trans %}Consult and revoke the authorization you gave to websites.{% endtrans %}
</div>
</h2>
2020-09-17 10:01:21 +00:00
2021-12-20 22:57:27 +00:00
{% if consents %}
<div class="ui centered cards">
{% for consent in consents %}
{% set client = clients[consent.client] %}
2021-12-20 22:57:27 +00:00
<div class="ui card">
<div class="content">
{% if client.logo_uri %}
<img class="right floated mini ui image" src="{{ client.logo_uri }}">
2021-12-20 22:57:27 +00:00
{% endif %}
2023-01-29 02:06:26 +00:00
{% if client.client_uri %}
<a href="{{ client.client_uri }}" class="header">{{ client.client_name }}</a>
2021-12-20 22:57:27 +00:00
{% else %}
2022-10-17 15:49:52 +00:00
<div class="header">{{ client.client_name }}</div>
2021-12-20 22:57:27 +00:00
{% endif %}
<div class="meta">{% trans %}From:{% endtrans %} {{ consent.issue_date.strftime("%d/%m/%Y %H:%M:%S") }}</div>
{% if consent.revokation_date %}
2021-12-20 22:57:27 +00:00
<div class="meta">{% trans %}Revoked:{% endtrans %} {{ consent.revokation_date.strftime("%d/%m/%Y %H:%M:%S") }}</div>
{% endif %}
<div class="description">
<p>{% trans %}Has access to:{% endtrans %}</p>
<div class="ui list">
{% for scope in consent.scope %}
{% if scope not in ignored_scopes %}
{% if scope not in scope_details %}
<div class="item" title="{{ scope }}">{{ scope }}</div>
{% else %}
<div class="item" title="{{ scope }}">
<i class="{{ scope_details[scope][0] }} icon"></i>
<div class="content">{{ scope_details[scope][1] }}</div>
</div>
{% endif %}
{% endif %}
2021-12-20 22:57:27 +00:00
{% endfor %}
</div>
2021-12-20 22:57:27 +00:00
</div>
</div>
2022-01-11 18:49:06 +00:00
<a class="ui bottom attached button" href="{{ url_for('oidc.consents.delete', consent_id=consent.cn[0] ) }}">
2021-12-20 22:57:27 +00:00
<i class="remove icon"></i>
{% trans %}Remove access{% endtrans %}
</a>
</div>
{% endfor %}
</div>
{% else %}
<div class="ui center aligned">
<div class="ui center aligned message">
<div class="content">
<p>{% trans %}You did not authorize applications yet.{% endtrans %}</p>
</div>
</div>
2021-12-20 22:57:27 +00:00
</div>
{% endif %}
2020-09-17 10:01:21 +00:00
</div>
{% endblock %}