This is an automated email from the ASF dual-hosted git repository.
tn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new d171fff make it clear when adding a function to the context
d171fff is described below
commit d171fff4e510b944cbc49b789cc02ca3aa68220d
Author: Thomas Neidhart <[email protected]>
AuthorDate: Mon Mar 24 11:33:25 2025 +0100
make it clear when adding a function to the context
---
atr/server.py | 4 ++--
atr/templates/includes/sidebar.html | 2 +-
atr/templates/project-view.html | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/atr/server.py b/atr/server.py
index 578f914..0a37188 100644
--- a/atr/server.py
+++ b/atr/server.py
@@ -156,8 +156,8 @@ def app_setup_context(app: base.QuartApp) -> None:
return {
"current_user": await asfquart.session.read(),
- "is_admin": is_admin,
- "is_project_lead": service.is_project_lead,
+ "is_admin_fn": is_admin,
+ "is_project_lead_fn": service.is_project_lead,
"commit": commit,
"version": version,
}
diff --git a/atr/templates/includes/sidebar.html
b/atr/templates/includes/sidebar.html
index 50e4512..c64c9d3 100644
--- a/atr/templates/includes/sidebar.html
+++ b/atr/templates/includes/sidebar.html
@@ -85,7 +85,7 @@
</li>
</ul>
- {% if is_admin(current_user.uid) %}
+ {% if is_admin_fn(current_user.uid) %}
<h3>Administration</h3>
<ul>
<li>
diff --git a/atr/templates/project-view.html b/atr/templates/project-view.html
index d518e81..4388532 100644
--- a/atr/templates/project-view.html
+++ b/atr/templates/project-view.html
@@ -20,7 +20,8 @@
{% endif %}
</div>
- {% set is_project_lead = is_project_lead(project, current_user.uid) %}
+ {% set is_admin = is_admin_fn(current_user.uid) %}
+ {% set is_project_lead = is_project_lead_fn(project, current_user.uid) %}
<div class="card mb-4">
<div class="card-header bg-light">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]