Restrict user names (lowercase, alphanumeric, dash)
Basic input hygiene that affects every model and the video. Prevent ugly or colliding usernames. Plan: restrict-user-names-plan.org.
*user-name-regex*("^[a-z]*[a-z0-9]$") added next to*fqdn-regex*inlisp/model.lisp;v-user-nametightened to length ≤(a:user-name-length-max *rbac*)+ regex scan (replacing thea:valid-user-name-pdelegation). Login keeps the rbac policy, so legacy names still sign in (decision 2 of the plan).- Five tests in
tests/backend-tests.lisp(insert rejects/accepts, update reject + rename round-trip,be-validate-form/be-validate-fielderror strings, legacy-name login guard). Two rbac quirks surfaced and are documented in the test bodies: renaming a user orphans the oldname:exclusiverole (cleanup is surgical), and uppercase legacy names cannot be created even directly (rbac's role regex rejects them on the exclusive-role insert), so the legacy-login test uses lowercase dot/underscore. - Docs: policy note added to the
:usersrow indocs/model-reference.mdbuilt-in types table and the:user-namerow indocs/hook-registry.md. - Full suite via
scripts/data-ui tests: 2085 checks, 38 groups, all passed.
- Slot
- 2700
- Status
- 60 Done
- Tags
- mvp, model, bug
- Contributors
- Donnie