Commit Graph

4 Commits

Author SHA1 Message Date
b86bf5b8c6 Обновлен дизайн страницы сброса пароля в едином стиле с карточкой 2025-12-02 00:05:45 +03:00
ca95eab5c1 Удалена регистрация пользователей внутри тенантов - теперь только вход и управление ролями владельцем 2025-12-01 23:51:07 +03:00
fb4bcf37ec feat: implement password setup link for tenant registration
When admin approves tenant registration:
- Owner account created in tenant schema (in addition to admin@localhost)
- Owner assigned 'owner' role with full permissions
- Password setup email sent with secure 7-day token link
- Owner sets password via link and auto-logs into their shop

Key changes:
- Added password_setup_token fields to TenantRegistration model
- Created tenants/services.py with formatted email service
- Modified _approve_registration to create owner account
- Added password_setup_confirm view with token validation
- Created password setup template and URL route
- Added admin action to resend password setup emails

Security:
- Token expires after 7 days
- Password not transmitted in email (secure setup link)
- Owner account inactive until password set
- Admin@localhost preserved for system administrator access

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 22:08:18 +03:00
d78c43d9a9 Initial commit: Django inventory system 2025-10-22 01:11:06 +03:00