You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Align CMS with use case: own-content editors, team-enforced galleries, StaticPage
Product decisions (Dylan, 2026-08-04):
- Editors edit only their own content: content/0004 revokes the editor
group's tree-wide change_page; add_page + Wagtail's owner model grant edit
on owned pages, publish_page applies only to those. migrate_tiptap gains
--owners "auth0|sub=email,..." to set Page.owner from the legacy author
column (Auth0 subjects) so pre-cutover content stays editable.
- group_only galleries enforced via Teams: JWT gains a map_groups claim
(user's teams' MapGroup slugs); the gallery API requires the gallery's
map_group in that claim or the admin role — any-valid-login no longer opens
restricted galleries.
- StaticPage type (+ StaticIndexPage) with /api/content/static/... served by
a Next.js /[slug] catch-all; hardcoded routes take precedence, so static
pages migrate into the CMS one at a time.
- District-comments 403 for tag-scoped reviewers: decided to keep as-is.
FOLLOWUPS doc updated; cms 220 tests, backend suite, typecheck + build green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
([cms/config/settings/base.py](../cms/config/settings/base.py)) because Next.js
53
43
RSCs cannot persist rotated cookies — single-use tokens deterministically
@@ -62,7 +52,7 @@ or make middleware the *only* refresher and re-enable blacklisting.
62
52
63
53
| Item | Where | Notes |
64
54
|---|---|---|
65
-
|⏳**NEEDS DECISION** — District comments for tag-scoped reviewers |[backend/app/comments/main.py](../backend/app/comments/main.py)| Blanket 403 today (district comments are tag-less). Either tag district comments at sync time or add per-document scoping. Menu link already hidden for scoped reviewers. |
55
+
|✅**DECIDED 2026-08-04: leave as-is** — District comments for tag-scoped reviewers |[backend/app/comments/main.py](../backend/app/comments/main.py)| Blanket 403 stays: scoped reviewers moderate community comments only; full reviewers/admins handle district comments. Menu link already hidden for scoped reviewers. |
66
56
| ✅ **DONE** — `/places` "N map modules" count |[app/src/app/(static)/places/page.tsx](../app/src/app/(static)/places/page.tsx)| Restored: card shows `N map module(s)` from the `districtr_map_slugs` the list endpoint returns. |
67
57
| ✅ **DONE** — GET `/auth/logout` CSRF |[app/src/app/auth/logout/route.ts](../app/src/app/auth/logout/route.ts)| Guarded with the Fetch-Metadata `Sec-Fetch-Site` header — an explicit `cross-site` GET bounces home WITHOUT signing out; same-origin/same-site/direct nav still log out. Chose this over the auto-submit-form approach: lower risk, no coupling to NextAuth CSRF internals, no redirect flash. |
68
58
| ⏳ **DEFERRED** (long-term) — PermissionGuard reads raw JWT client-side |[app/src/app/admin/components/PermissionGuard.tsx](../app/src/app/admin/components/PermissionGuard.tsx)| Now base64url-safe via shared `decodeJwtPayload`, but long-term the access token shouldn't need to reach the client at all — pass roles/scopes as typed session fields and keep the token server-side. Larger auth-session refactor; left as-is. |
@@ -137,7 +127,13 @@ or make middleware the *only* refresher and re-enable blacklisting.
137
127
3. Staging rehearsal on the `-dev` Fly apps first (full sequence below, plus a
138
128
backend `alembic revision --autogenerate` afterward proving an empty diff).
139
129
4. Merge → CI deploys api/app/cms (release commands run both migration systems).
140
-
5.`manage.py migrate_tiptap --dry-run` → review report → real run.
130
+
5.`manage.py migrate_tiptap --dry-run` → review report → real run **with
131
+
`--owners "auth0|<sub>=<email>,..."`** (map the two legacy author subjects
132
+
to provisioned users so their pages stay editable under own-content-only).
133
+
5b. In the Wagtail admin, add a "Static pages" index page under Home
134
+
(StaticPage type, new 2026-08-04): static site pages migrate into the CMS
135
+
one at a time — delete the hardcoded Next.js route, publish a StaticPage
136
+
with the same slug (the `/[slug]` catch-all serves it).
0 commit comments