feat: restrict AI Bibliotek sign-up to whitelisted municipalities#26
Merged
Conversation
The library is intended only for employees of participating Danish municipalities. Sign-up now uses a select of whitelisted myndigheder and enforces an email-domain match, so the access rule is tangible in the mock. The fuller model (email verification, per-domain admin) is documented as design intent since the localStorage prototype does not implement it. Co-authored-by: Claude <noreply@anthropic.com>
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.
Summary
selectlimited to whitelisted municipalities (sharedMUNICIPALITIESlist inauth.js), andregister()enforces that the email domain matches the selected municipality's domain.index.mdnow describes the intended access model — whitelisted email domains, account verification via email link on sign-up, and a per-domain admin who can delete and promote users — clearly marked as design intent that thelocalStoragemock does not implement. Added an "Hvem styrer whitelisten og admin-rollen?" clarifying question.CHANGELOG.md.Test plan
npm run docs:dev, open the AI Bibliotek prototype → Opret bruger tabsomeone@gmail.com→ rejected (domain mismatch);someone@aarhus.dk→ successmette@aarhus.dk,jonas@odense.dk) still worknpm run docs:buildsucceeds and the updated "Registrering og login" section rendersGenerated with Claude Code