Merge dev into master: photon table export endpoint - #1002
Merged
Conversation
Photon (the new backend) has no access to this database, so the one-time user migration cannot read MySQL directly. This adds a read-only bulk export it can consume over HTTP instead. GET /migration/photon-user-export/ returns every user with the exact fields Photon's import needs — name, email, gender, allergy, image, the flags, and the bio (description, gitHub_link, linkedIn_link). Password hashes and auth tokens are left out on purpose: Photon sets its own placeholder password and users authenticate via Feide afterwards, so no secret leaves this system. Gated on is_admin_user (HS/Index) AND is_superuser. It exposes every member's name, email and bio in one response, so it is meant to be short-lived — remove it once the migration is done. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chore(content): sync Photon export endpoint to dev
Companion to the user export from #998: Photon's full migration (registrations, strikes, payments, forms, ...) reads plain SELECT * from 26 tables, but has no MySQL access in production. This exposes those tables — and only those — as paged JSON, gated to superusers in HS/Index like the user export, and like it to be removed once the migration is done. content_user's password column never leaves. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CodeQL flagged the f-string SQL as user-controlled: it cannot see set membership as sanitization. Selecting the allowlist's own element severs the taint path — the request now only picks which hardcoded name to use. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(content): superuser table export endpoint for the Photon migration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hva
Får #1000 (tabelleksport-endepunktet for Photon-migrasjonen) ut i prod.
Hvorfor konflikter
#998 (bruker-eksporten) gikk rett til
master, mensdevfikk samme innhold via sync-PR #999 som andre commits. Git ser da to sider som endret de samme linjene iurls.pyogviews/__init__.py. Innholdet var identisk — løsningen er dev sin side, som bare legger table-export-linjene inntil user-export-linjene begge sider allerede har.Netto diff mot master: kun de 164 nye linjene fra #1000.
Viktig ved merge
Bruk «Create a merge commit», ikke squash — ellers blir ikke dev ancestor av master og de samme konfliktene kommer tilbake neste gang (samme fenomen som i Photon, jf. #999).
🤖 Generated with Claude Code