Phase 1: app, Kanidm login, people, passports, addresses, audit log
visa.buildfor.life keeps the immigration records of the foreigners B4L looks after. This first phase is the base the deadlines and extension packs build on (docs/PLAN.md, phases 2 to 7). - One Rust binary (axum 0.8, minijinja, sqlx on PostgreSQL) with its templates, static files and migrations compiled in. - Login through Kanidm (OpenID Connect with PKCE and a nonce, ES256), client visa-web, group visa; sessions in PostgreSQL keyed by the SHA-256 of the cookie. VISA_INSECURE_NO_LOGIN=1 for loopback development only. - Same-site check and form token on every POST; a CSP without inline script or style; security headers. - People: list with filter, page, create, edit, archive, restore. - Passports from the machine-readable zone with check digits (ICAO 9303 TD3); expiry warnings at 12 and 6 months. - Addresses in Thailand in the order Thai forms use, with the house master and the TM.30 receipt. - Append-only audit log of every view and change, with the names of the changed fields but never their values (PDPA); the Activity page. - Invented demo people (visa seed-demo, refused when login is on). - 40 tests: unit tests, pages with demo data, the forms, the audit log and the whole login against a fake OpenID provider. - CI: gitleaks over the history, fmt, clippy and the tests against PostgreSQL 18; the pre-commit secret scan.
This commit is contained in:
commit
2e009700a9
56 files changed
+11193
No files matched your search
@@ -0,0 +1,44 @@
|
||||
{% extends "base.html" %}
|
||||
{% block main %}
|
||||
<div class="pagehead">
|
||||
<h1>{% if archived %}Archived people{% else %}People{% endif %}</h1>
|
||||
<div class="actions"><a class="btn pri" href="/people/new" id="new-person">+ New person</a></div>
|
||||
</div>
|
||||
{% if people or n_archived %}
|
||||
<div class="toolbar">
|
||||
{% if people %}<input type="search" id="q" class="filter" placeholder="Filter by name, passport, nationality or employer ( / )" aria-label="Filter the list" autocomplete="off">{% endif %}
|
||||
{% if archived %}<a href="/people">Back to the {{ n_active }} in the list</a>{% elif n_archived %}<a href="/people?archived=1">Archived ({{ n_archived }})</a>{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if people %}
|
||||
<div class="card flush">
|
||||
<div class="tblwrap">
|
||||
<table class="tbl" id="people">
|
||||
<thead>
|
||||
<tr><th>Name</th><th class="hs">Nationality</th><th>Passport</th><th>Valid until</th><th class="hs">Lives in</th><th class="hs">Employer</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in people %}
|
||||
<tr data-q="{{ r.q }}">
|
||||
<td><a class="strong" href="/people/{{ r.id }}">{{ r.name }}</a>{% if r.age is not none %}<div class="sub">{{ r.age }} years</div>{% endif %}</td>
|
||||
<td class="hs">{{ r.nationality }}</td>
|
||||
<td>{% if r.passport_number %}<span class="mono">{{ r.passport_number }}</span>{% else %}<span class="muted">none recorded</span>{% endif %}</td>
|
||||
<td>{% if r.passport_status %}{{ r.passport_expires }}<div><span class="chip {{ r.passport_status.level }}">{{ r.passport_status.label }}</span></div>{% endif %}</td>
|
||||
<td class="hs">{{ r.province }}</td>
|
||||
<td class="hs">{{ r.employer }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="filter-empty" data-filter-empty hidden>No one in the list matches the filter.</p>
|
||||
</div>
|
||||
{% elif archived %}
|
||||
<div class="card"><p class="empty-inline">No one is archived.</p></div>
|
||||
{% else %}
|
||||
<div class="card">
|
||||
<h2>No people yet</h2>
|
||||
<p>Add the first person with <b>+ New person</b>. Paste the two lines at the bottom of the passport's photo page there, and the form fills in the name, nationality, date of birth and the passport itself.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user