Assign Organizations Automatically by Domain
Enable automatic organization assignment when creating users. Match user email domain against organization domains and auto-assign to matching organization. Support manual addition of users with non-matching email domains.
Note:
- On user creation, extract domain from email address
- Query organizations for matching domain (from TBD-07)
- Auto-assign user to organization if domain matches
- UI should show which organization will be assigned (if any) before creation
- Allow admin override: manually assign to different org or no org
- Support adding users with email addresses that don't match any org domain
- Domain matching: case-insensitive, stored lowercased
- Domain uniqueness: only one org can claim a domain as default
- Domain changes: existing memberships remain, new assignments use current domain config