Initial commit: web-app boilerplate with auth, OIDC/SSO, admin panel, i18n
Rust (cot framework) + PostgreSQL boilerplate providing: - Session-based auth with Admin/User roles - OIDC/SSO login with PKCE, group-to-role mapping, auto-provisioning - Admin panel: user management, settings, debug/config inspector - 3-tier config system (compiled default → DB → FURU_* env vars) - i18n (English + Russian) with compile-time translations macro - JSON API skeleton (GET /api/me) - DB-backed sessions (survive server restarts) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{% extends "admin/layout.html" %}
|
||||
{% block admin_title %}{{ t.nav_users }}{% endblock admin_title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ t.users_heading }}</h1>
|
||||
|
||||
<p style="margin-bottom: 1rem;">
|
||||
<a href="/admin/users/new" style="display:inline-block; padding:.5rem 1rem; background:#1a1a2e; color:#fff; text-decoration:none; border-radius:4px;">{{ t.users_add }}</a>
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>{{ t.users_username }}</th>
|
||||
<th>{{ t.users_email }}</th>
|
||||
<th>{{ t.users_display_name }}</th>
|
||||
<th>{{ t.users_role }}</th>
|
||||
<th>{{ t.users_active }}</th>
|
||||
<th>{{ t.users_actions }}</th>
|
||||
</tr>
|
||||
{% for u in users %}
|
||||
<tr>
|
||||
<td>{{ u.username_str() }}</td>
|
||||
<td>{{ u.email_str() }}</td>
|
||||
<td>{{ u.display_name_str() }}</td>
|
||||
<td>{{ u.role_str() }}</td>
|
||||
<td>{{ u.is_active() }}</td>
|
||||
<td>
|
||||
<a href="/admin/users/{{ u.id_val() }}/edit">{{ t.users_edit }}</a>
|
||||
|
|
||||
<form method="post" action="/admin/users/{{ u.id_val() }}/delete" style="display:inline;" onsubmit="return confirm('{{ t.users_delete_confirm }}')">
|
||||
<button type="submit" style="background:none; border:none; color:#c00; cursor:pointer; padding:0; text-decoration:underline;">{{ t.users_delete }}</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user