Add email verification, admin approval, and user profile enhancements

Implement comprehensive email verification and admin approval system for user registration. Users must verify their email before logging in, and admins must approve new users before they can access the system.

Major features:
- Email verification with UUID tokens (24hr expiry, one-time use)
- Admin approval workflow via Django admin interface
- Custom authentication backend enforcing verification and approval
- Password change functionality for authenticated users
- Enhanced profile page with proper styling and theme support
- Collect first name, last name, and timezone during registration
- Profile link added to header navigation

Email notifications:
- Verification email sent after registration
- Admin notification when users need approval
- Approval notification sent to users

Security features:
- Cryptographically secure UUID tokens
- Token expiration and one-time use enforcement
- Email enumeration protection
- Custom JWT token validation for API access
- Existing users auto-approved via data migration

Templates added:
- Email templates (verification, approval, admin notification)
- Web templates (password change, verification pages)
- Enhanced profile page with dark/light mode support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Keith Smith
2025-12-22 18:13:38 -07:00
co-authored by Claude Sonnet 4.5
parent 87afc4e80c
commit 21d9d01885
24 changed files with 1269 additions and 73 deletions
+14
View File
@@ -0,0 +1,14 @@
New User Registration
A new user has registered and verified their email address:
Email: {{ user.email }}
Username: {{ user.username }}
{% if user.first_name or user.last_name %}Name: {{ user.first_name }} {{ user.last_name }}
{% endif %}Registered: {{ user.created_at|date:"F j, Y, g:i a" }}
Please review and approve this user in the admin panel:
{{ admin_url }}
---
KeepItGoing (automated notification)