Per-client ICS calendar feed, replacing the shared ICS_TOKEN (#22)
Test backoffice (smb-crm) / test (push) Has been cancelled

Each client now gets their own clients.ics_token (lazily generated on
first /owner/settings visit), which both authenticates and scopes
/api/bookings.ics -- closing the gap where any shared-token holder
could view another client's bookings by swapping the client_id query
param. The owner settings page now surfaces a copyable subscribe URL.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 11:55:35 +02:00
parent 319218ce21
commit 24d9aca812
9 changed files with 196 additions and 20 deletions
+2
View File
@@ -61,9 +61,11 @@ def settings():
hours_by_resource = {
r["resource_id"]: bdb.get_resource_hours(client_id, r["resource_id"])
for r in resources}
ics_token = bdb.ensure_ics_token(client_id)
return render_template(
"owner/settings.html", client=client, services=bdb.list_services(client_id),
resources=resources, hours_by_resource=hours_by_resource, weekdays=WEEKDAYS,
ics_url=url_for("bookings_ics", token=ics_token, _external=True),
error=request.args.get("error"))