diff --git a/src/meshcore_hub/web/app.py b/src/meshcore_hub/web/app.py index 1697fa3..417066d 100644 --- a/src/meshcore_hub/web/app.py +++ b/src/meshcore_hub/web/app.py @@ -175,5 +175,6 @@ def get_network_context(request: Request) -> dict: "network_contact_discord": request.app.state.network_contact_discord, "network_contact_github": request.app.state.network_contact_github, "network_welcome_text": request.app.state.network_welcome_text, + "admin_enabled": request.app.state.admin_enabled, "version": __version__, } diff --git a/src/meshcore_hub/web/templates/admin/index.html b/src/meshcore_hub/web/templates/admin/index.html index 72ecd63..b38c148 100644 --- a/src/meshcore_hub/web/templates/admin/index.html +++ b/src/meshcore_hub/web/templates/admin/index.html @@ -3,7 +3,7 @@ {% block title %}{{ network_name }} - Admin{% endblock %} {% block content %} -
+

Admin

+ +
+ {% if auth_username or auth_user %} + + + + + {{ auth_username or auth_user }} + + {% endif %} + {% if auth_email %} + + + + + {{ auth_email }} + + {% endif %} +
+ -
+ - - -
-
-

Authenticated User

-
- - - - - - - - - - - - - - - - - - - -
X-Forwarded-User{{ auth_user or '-' }}
X-Forwarded-Preferred-Username{{ auth_username or '-' }}
X-Forwarded-Email{{ auth_email or '-' }}
X-Forwarded-Groups{{ auth_groups or '-' }}
-
-
-
{% endblock %} diff --git a/src/meshcore_hub/web/templates/base.html b/src/meshcore_hub/web/templates/base.html index 3b6c66c..e198150 100644 --- a/src/meshcore_hub/web/templates/base.html +++ b/src/meshcore_hub/web/templates/base.html @@ -114,7 +114,7 @@ GitHub {% endif %}

-

Powered by MeshCore Hub {{ version }}

+

{% if admin_enabled %}Admin | {% endif %}Powered by MeshCore Hub {{ version }}