fix(registratie): oprichter krijgt expliciet school_role='admin' - #33
Merged
Conversation
Sinds F3.1A is de DB-default voor instructors.school_role de veilige 'employee' en zijn financiën en de Stripe Billing Portal admin-only. De web-registratie zette geen rol, dus een nieuw geregistreerde school was direct beheerder-loos: de oprichter werd employee en kwam de admin-afscherming nergens meer doorheen. De registratie-oprichter wijkt nu bewust en expliciet af van de DB-default; alle overige aanmaakpaden (invites) blijven op de veilige default. Test pint vast: precies één instructors-insert mét school_role='admin', en de multi-use uitnodigingslink blijft een leerling-invite zonder rol-parameter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSchool registration now explicitly assigns the founder instructor ChangesSchool registration role assignment
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Wat
De web-registratie (`app/api/register-school/route.ts`) zette geen `school_role` bij de eerste instructors-insert. Sinds F3.1A (ribbaPro) is de DB-default de veilige `employee` en zijn financiën én de Stripe Billing Portal admin-only — een via de web geregistreerde school was daardoor direct beheerder-loos.
Fix (bewust minimaal): `school_role: 'admin'` op uitsluitend de registratie-oprichter, met een korte comment waarom dit pad bewust afwijkt van de veilige DB-default.
Buiten scope (onaangeraakt)
Geen DB-default-wijziging, geen invite-flow, geen portalcode, geen Mollie-paden, geen andere registratievelden, geen migratie of productiedata, geen deploy. PR #32 staat los hiervan geparkeerd.
Bewijs
De datacorrectie voor de bestaande E2E-school is een aparte actie met eigen GO ná merge van deze bronfix.
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests