32 lines
1.4 KiB
HTML
32 lines
1.4 KiB
HTML
{#
|
|
Copyright 2024, 2025 New Vector Ltd.
|
|
Copyright 2023, 2024 The Matrix.org Foundation C.I.C.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE files in the repository root for full details.
|
|
-#}
|
|
|
|
{% macro list(scopes) %}
|
|
<ul>
|
|
{% for scope in (scopes | split(" ")) %}
|
|
{% if scope == "openid" %}
|
|
<li>{{ icon.user_profile() }}<p>{{ _("mas.scope.view_profile") }}</p></li>
|
|
{% elif scope == "urn:mas:graphql:*" %}
|
|
<li>{{ icon.info() }}<p>{{ _("mas.scope.edit_profile") }}</p></li>
|
|
<li>{{ icon.computer() }}<p>{{ _("mas.scope.manage_sessions") }}</p></li>
|
|
{% elif scope == "urn:matrix:client:api:*" or scope == "urn:matrix:org.matrix.msc2967.client:api:*" %}
|
|
<li>{{ icon.chat() }}<p>{{ _("mas.scope.view_messages") }}</p></li>
|
|
<li>{{ icon.send() }}<p>{{ _("mas.scope.send_messages") }}</p></li>
|
|
{% elif scope == "urn:synapse:admin:*" %}
|
|
<li class="dangerous">{{ icon.room() }}<p>{{ _("mas.scope.synapse_admin") }}</p></li>
|
|
{% elif scope == "urn:mas:admin" %}
|
|
<li class="dangerous">{{ icon.admin() }}<p>{{ _("mas.scope.mas_admin") }}</p></li>
|
|
{% elif scope is startingwith("urn:matrix:client:device:") or scope is startingwith("urn:matrix:org.matrix.msc2967.client:device:") %}
|
|
{# We hide this scope #}
|
|
{% else %}
|
|
<li>{{ icon.info() }}<p>{{ scope }}</p></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro %}
|