Skip to content

feat: restrict AI Bibliotek sign-up to whitelisted municipalities#26

Merged
yepzdk merged 1 commit into
mainfrom
feature/ai-bibliotek-whitelisted-signup
Jun 8, 2026
Merged

feat: restrict AI Bibliotek sign-up to whitelisted municipalities#26
yepzdk merged 1 commit into
mainfrom
feature/ai-bibliotek-whitelisted-signup

Conversation

@yepzdk

@yepzdk yepzdk commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prototype: the "Myndighed eller organisation" field on sign-up is now a select limited to whitelisted municipalities (shared MUNICIPALITIES list in auth.js), and register() enforces that the email domain matches the selected municipality's domain.
  • Documentation: index.md now 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 the localStorage mock does not implement. Added an "Hvem styrer whitelisten og admin-rollen?" clarifying question.
  • Updated CHANGELOG.md.

Test plan

  • npm run docs:dev, open the AI Bibliotek prototype → Opret bruger tab
  • "Myndighed eller organisation" is a dropdown of whitelisted municipalities (no free-text)
  • Select Aarhus Kommune + someone@gmail.com → rejected (domain mismatch); someone@aarhus.dk → success
  • Existing demo logins (mette@aarhus.dk, jonas@odense.dk) still work
  • npm run docs:build succeeds and the updated "Registrering og login" section renders

Generated with Claude Code

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>
@yepzdk yepzdk merged commit 80b6118 into main Jun 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant