Participant pages: read the tenant from inject:tenant, like the admin area #6

Open
opened 2026-11-20 20:13:14 +01:00 by dasniko · 0 comments
Member

Problem
In the participant templates tenant means different things depending on the page:

  • registration.html and thanks.html get the bare id string.
  • The meeting pages (logoheader.html, meeting/layout.html, meeting/notAvailable.html) get the Tenant entity.
  • The remaining pages get no tenant at all.

Plain data keys are not checked at build time, so a wrong expression still renders something that looks fine. For example, a wrong tenant prefix produces a dead unsubscribe link, and passing the entity where the id is expected prints Tenant(id=…) into the page. The admin area lost this failure mode when it moved to the CurrentTenant bean.

Change

  • Tests first. Assert the full deregistration href on thanks.html and on registration.html, plus the JUG name, privacy and imprint links in the meeting logo header, plus the homepage link on the "not available" page. None of these are covered today.
  • CurrentTenant: add getWebsite(), getPrivacy() and getImprint(), with a null guard for paths that have no tenant segment.
  • Templates: switch 9 expressions from {tenant…} to {inject:tenant…}.
  • Resources: remove the .data("tenant", …) calls from RegistrationResource (3) and MeetingResource (2).
  • Docs: update the TenantStyle and CurrentTenant javadoc and CLAUDE.md.

Out of scope

  • Mail templates. They render on an async worker thread.
  • Moving the logo header into public.html. That is a product decision.
**Problem** In the participant templates `tenant` means different things depending on the page: - `registration.html` and `thanks.html` get the bare id string. - The meeting pages (`logoheader.html`, `meeting/layout.html`, `meeting/notAvailable.html`) get the `Tenant` entity. - The remaining pages get no tenant at all. Plain data keys are not checked at build time, so a wrong expression still renders something that looks fine. For example, a wrong tenant prefix produces a dead unsubscribe link, and passing the entity where the id is expected prints `Tenant(id=…)` into the page. The admin area lost this failure mode when it moved to the `CurrentTenant` bean. **Change** - Tests first. Assert the full deregistration href on `thanks.html` and on `registration.html`, plus the JUG name, privacy and imprint links in the meeting logo header, plus the homepage link on the "not available" page. None of these are covered today. - `CurrentTenant`: add `getWebsite()`, `getPrivacy()` and `getImprint()`, with a null guard for paths that have no tenant segment. - Templates: switch 9 expressions from `{tenant…}` to `{inject:tenant…}`. - Resources: remove the `.data("tenant", …)` calls from `RegistrationResource` (3) and `MeetingResource` (2). - Docs: update the `TenantStyle` and `CurrentTenant` javadoc and `CLAUDE.md`. **Out of scope** - Mail templates. They render on an async worker thread. - Moving the logo header into `public.html`. That is a product decision.
dasniko self-assigned this 2026-11-20 20:14:44 +01:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ijug-ev/registration#6
No description provided.