2024-12-16 17:17:42 +00:00
|
|
|
{# Consent request template.
|
|
|
|
|
|
|
|
This templates is displayed to users accessing a new application that requests to access to personal information.
|
|
|
|
It lists the personal information requested by the application, and offers the user to accept or decline.
|
|
|
|
|
|
|
|
:param user: The user whose consent is asked.
|
|
|
|
:type user: :class:`~canaille.core.models.User`
|
|
|
|
:param grant: The OIDC grant.
|
|
|
|
:type grant: An Authlib ``Grant``
|
|
|
|
#}
|
2021-10-28 13:24:34 +00:00
|
|
|
{% extends theme('base.html') %}
|
2023-03-28 21:12:54 +00:00
|
|
|
{% import 'macro/form.html' as fui %}
|
2020-08-17 09:53:30 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2023-06-30 16:39:50 +00:00
|
|
|
<div class="ui segment" hx-boost="false">
|
2022-01-11 16:57:58 +00:00
|
|
|
{% if client.logo_uri %}
|
2022-10-17 15:49:52 +00:00
|
|
|
<img class="ui centered tiny image" src="{{ client.logo_uri }}" alt="{{ client.client_name }}">
|
2021-12-20 22:57:27 +00:00
|
|
|
{% endif %}
|
2020-08-14 11:18:08 +00:00
|
|
|
|
2023-09-01 08:46:56 +00:00
|
|
|
<h2 class="ui header">
|
|
|
|
{% trans name=client.client_name %}The application {{ name }} is requesting access to:{% endtrans %}
|
|
|
|
</h2>
|
2020-08-14 11:18:08 +00:00
|
|
|
|
2021-12-20 22:57:27 +00:00
|
|
|
<div class="ui divided items">
|
2022-12-28 00:46:05 +00:00
|
|
|
{% for scope in grant.request.scope.split(" ") %}
|
|
|
|
{% if scope not in ignored_scopes %}
|
2021-12-20 22:57:27 +00:00
|
|
|
<div class="item">
|
2022-12-28 00:46:05 +00:00
|
|
|
{% if scope in scope_details %}
|
2021-12-20 22:57:27 +00:00
|
|
|
<div>
|
2022-12-28 00:46:05 +00:00
|
|
|
<i class="{{ scope_details[scope][0] }} large icon"></i>
|
|
|
|
{{ scope_details[scope][1] }}
|
2021-12-20 22:57:27 +00:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="ui tiny image">
|
|
|
|
<i class="huge user icon"></i>
|
2022-12-28 00:46:05 +00:00
|
|
|
{{ scope }}
|
2021-12-20 22:57:27 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-10-29 14:28:19 +00:00
|
|
|
</div>
|
2020-08-17 15:49:49 +00:00
|
|
|
|
2021-12-20 22:57:27 +00:00
|
|
|
<div class="ui center aligned container">
|
2023-11-15 17:20:13 +00:00
|
|
|
{{ gettext('You are logged in as %(name)s', name=user.formatted_name) }}
|
2021-12-20 22:57:27 +00:00
|
|
|
</div>
|
2020-11-06 10:57:21 +00:00
|
|
|
|
2021-12-20 22:57:27 +00:00
|
|
|
<div class="ui center aligned container">
|
2023-03-28 21:12:54 +00:00
|
|
|
{% call fui.render_form(form) %}
|
2021-12-20 22:57:27 +00:00
|
|
|
<div class="ui stackable buttons">
|
|
|
|
<button name="answer" type="submit" class="ui negative button" value="deny" id="deny">
|
|
|
|
{% trans %}Deny{% endtrans %}
|
|
|
|
</button>
|
|
|
|
<button name="answer" type="submit" class="ui button" value="logout" id="logout">
|
|
|
|
{% trans %}Switch user{% endtrans %}
|
|
|
|
</button>
|
|
|
|
<button name="answer" type="submit" class="ui primary button" value="accept" id="accept">
|
|
|
|
{% trans %}Accept{% endtrans %}
|
|
|
|
</button>
|
|
|
|
</div>
|
2023-03-28 21:12:54 +00:00
|
|
|
{% endcall %}
|
2021-12-20 22:57:27 +00:00
|
|
|
</div>
|
2020-08-17 15:49:49 +00:00
|
|
|
</div>
|
2020-08-17 09:53:30 +00:00
|
|
|
{% endblock %}
|