Un-break the scope tempalte helpers

This commit is contained in:
Quentin Gliech
2025-12-03 14:04:46 +01:00
parent 4eb8543af5
commit e50a7163e8
2 changed files with 14 additions and 9 deletions

View File

@@ -9,8 +9,13 @@ Please see LICENSE files in the repository root for full details.
{# Macro to remove 'safe' scope from a scope list. Usage: {# Macro to remove 'safe' scope from a scope list. Usage:
{% call(scopes) scope.unsafe_scopes(scopes=["openid", "urn:matrix:client:api:*", "urn:synapse:admin:*", "urn:mas:admin"]) %} {% call(scopes) scope.unsafe_scopes(scopes=["openid", "urn:matrix:client:api:*", "urn:synapse:admin:*", "urn:mas:admin"]) %}
{# `scopes` only has unsafe scopes: ["urn:synapse:admin:*", "urn:mas:admin"] #} `scopes` only has unsafe scopes: ["urn:synapse:admin:*", "urn:mas:admin"]
{{ scopes }}
<ul>
{% for scope in scopes %}
<li>{{ scope }}</li>
{% endfor %}
</ul>
{% endcall %} {% endcall %}
#} #}
{% macro unsafe_scopes(scopes) -%} {% macro unsafe_scopes(scopes) -%}

View File

@@ -655,36 +655,36 @@
"scope": { "scope": {
"edit_profile": "Edit your profile and contact details", "edit_profile": "Edit your profile and contact details",
"@edit_profile": { "@edit_profile": {
"context": "components/scope.html:38:35-62", "context": "components/scope.html:44:35-62",
"description": "Displayed when the 'urn:mas:graphql:*' scope is requested" "description": "Displayed when the 'urn:mas:graphql:*' scope is requested"
}, },
"manage_sessions": "Manage your devices and sessions", "manage_sessions": "Manage your devices and sessions",
"@manage_sessions": { "@manage_sessions": {
"context": "components/scope.html:39:39-69", "context": "components/scope.html:45:39-69",
"description": "Displayed when the 'urn:mas:graphql:*' scope is requested" "description": "Displayed when the 'urn:mas:graphql:*' scope is requested"
}, },
"mas_admin": "Manage users (urn:mas:admin)", "mas_admin": "Manage users (urn:mas:admin)",
"@mas_admin": { "@mas_admin": {
"context": "components/scope.html:46:54-91", "context": "components/scope.html:52:54-91",
"description": "Displayed when the 'urn:mas:admin' scope is requested" "description": "Displayed when the 'urn:mas:admin' scope is requested"
}, },
"send_messages": "Send new messages on your behalf", "send_messages": "Send new messages on your behalf",
"@send_messages": { "@send_messages": {
"context": "components/scope.html:42:35-63" "context": "components/scope.html:48:35-63"
}, },
"synapse_admin": "Administer the server (urn:synapse:admin:*)", "synapse_admin": "Administer the server (urn:synapse:admin:*)",
"@synapse_admin": { "@synapse_admin": {
"context": "components/scope.html:44:53-94", "context": "components/scope.html:50:53-94",
"description": "Displayed when the 'urn:synapse:admin:*' scope is requested" "description": "Displayed when the 'urn:synapse:admin:*' scope is requested"
}, },
"view_messages": "View your existing messages and data", "view_messages": "View your existing messages and data",
"@view_messages": { "@view_messages": {
"context": "components/scope.html:41:35-63", "context": "components/scope.html:47:35-63",
"description": "Displayed when the 'urn:matrix:client:api:*' scope is requested" "description": "Displayed when the 'urn:matrix:client:api:*' scope is requested"
}, },
"view_profile": "See your profile info and contact details", "view_profile": "See your profile info and contact details",
"@view_profile": { "@view_profile": {
"context": "components/scope.html:36:43-70", "context": "components/scope.html:42:43-70",
"description": "Displayed when the 'openid' scope is requested" "description": "Displayed when the 'openid' scope is requested"
} }
}, },