forked from Github-Mirrors/canaille
176 lines
9.2 KiB
HTML
176 lines
9.2 KiB
HTML
{% extends theme('base.html') %}
|
|
|
|
{% 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">
|
|
<h2 class="ui center aligned header">
|
|
<div class="content">
|
|
{{ _("My consents") }}
|
|
</div>
|
|
<div class="sub header">
|
|
{% trans %}Consult and revoke the authorization you gave to websites.{% endtrans %}
|
|
</div>
|
|
</h2>
|
|
|
|
{% if consents %}
|
|
<div class="ui centered cards">
|
|
{% for consent in consents %}
|
|
{% set client = clients[consent.client] %}
|
|
<div class="ui card">
|
|
<div class="content">
|
|
{% if client.logo_uri %}
|
|
<img class="right floated mini ui image" src="{{ client.logo_uri }}">
|
|
{% endif %}
|
|
{% if client.client_uri %}
|
|
<a href="{{ client.client_uri }}" class="header">{{ client.client_name }}</a>
|
|
{% else %}
|
|
<div class="header">{{ client.client_name }}</div>
|
|
{% endif %}
|
|
{% if consent.issue_date %}
|
|
<div class="meta">{% trans %}From:{% endtrans %} {{ consent.issue_date.strftime("%d/%m/%Y %H:%M:%S") }}</div>
|
|
{% endif %}
|
|
{% if consent.revokation_date %}
|
|
<div class="meta">{% trans %}Revoked:{% endtrans %} {{ consent.revokation_date.strftime("%d/%m/%Y %H:%M:%S") }}</div>
|
|
{% endif %}
|
|
<div class="description">
|
|
<p>
|
|
{% if consent.revokation_date %}
|
|
{% trans %}Had access to:{% endtrans %}
|
|
{% else %}
|
|
{% trans %}Has access to:{% endtrans %}
|
|
{% endif %}
|
|
</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 %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if client.tos_uri or client.policy_uri %}
|
|
<div class="extra content">
|
|
{% if client.policy_uri %}
|
|
<span class="right floated">
|
|
<i class="mask icon"></i>
|
|
<a href="{{ client.policy_uri }}">{% trans %}Policy{% endtrans %}</a>
|
|
</span>
|
|
{% endif %}
|
|
{% if client.tos_uri %}
|
|
<span>
|
|
<i class="file signature icon"></i>
|
|
<a href="{{ client.tos_uri }}">{% trans %}Terms of service{% endtrans %}</a>
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% if consent.revokation_date %}
|
|
<a class="ui bottom attached button" href="{{ url_for('oidc.consents.restore', consent_id=consent.cn[0] ) }}">
|
|
<i class="reply icon"></i>
|
|
{% trans %}Restore access{% endtrans %}
|
|
</a>
|
|
{% else %}
|
|
<a class="ui bottom attached button" href="{{ url_for('oidc.consents.revoke', consent_id=consent.cn[0] ) }}">
|
|
<i class="remove icon"></i>
|
|
{% trans %}Revoke access{% endtrans %}
|
|
</a>
|
|
{% endif %}
|
|
</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>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if preconsented %}
|
|
<h2 class="ui center aligned header">
|
|
<div class="content">
|
|
{{ _("Pre-authorized applications") }}
|
|
</div>
|
|
<div class="sub header">
|
|
{% trans %}Those applications automatically have authorizations to access you data.{% endtrans %}
|
|
</div>
|
|
</h2>
|
|
<div class="ui centered cards">
|
|
{% for client in preconsented %}
|
|
<div class="ui card">
|
|
<div class="content">
|
|
{% if client.logo_uri %}
|
|
<img class="right floated mini ui image" src="{{ client.logo_uri }}">
|
|
{% endif %}
|
|
{% if client.client_uri %}
|
|
<a href="{{ client.client_uri }}" class="header">{{ client.client_name }}</a>
|
|
{% else %}
|
|
<div class="header">{{ client.client_name }}</div>
|
|
{% endif %}
|
|
<div class="description">
|
|
<p>
|
|
{% trans %}Has access to:{% endtrans %}
|
|
</p>
|
|
<div class="ui list">
|
|
{% for scope in client.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 %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if client.tos_uri or client.policy_uri %}
|
|
<div class="extra content">
|
|
{% if client.policy_uri %}
|
|
<span class="right floated">
|
|
<i class="mask icon"></i>
|
|
<a href="{{ client.policy_uri }}">{% trans %}Policy{% endtrans %}</a>
|
|
</span>
|
|
{% endif %}
|
|
{% if client.tos_uri %}
|
|
<span>
|
|
<i class="file signature icon"></i>
|
|
<a href="{{ client.tos_uri }}">{% trans %}Terms of service{% endtrans %}</a>
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
<a class="ui bottom attached button" href="{{ url_for('oidc.consents.revoke_preconsent', client_id=client.client_id ) }}">
|
|
<i class="remove icon"></i>
|
|
{% trans %}Revoke access{% endtrans %}
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|