- Receive Evotor webhooks: POST /user/create, /user/verify, /user/token
- Create users in pending status; match to existing users by email/phone
- Send invite link via Celery notification task; user sets password at /invite
- Abstract EmailProvider/SMSProvider with ConsoleEmailProvider default
- Role-based access control: role enum on users + roles/permissions tables
- Admin panel: /admin/users (list, filter, search, paginate), user detail card
with activate/suspend/reset-password/send-invite/edit/delete actions
- Admin roles management: /admin/roles with per-role permission assignment
- Extend user profile card: role, status, Evotor ID, email confirmation badge
- Auth routes: register, login, logout, confirm-email, forgot/reset password
- Alembic migrations 0002 (full schema + new fields) and 0003 (RBAC + seeds)
- Port Pico CSS + Bootstrap Icons UI from Node.js commit (854c912)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
DATABASE_URL: str = "mysql+pymysql://evosync:evosync@db:3306/evosync"
|
|
REDIS_URL: str = "redis://redis:6379/0"
|
|
SECRET_KEY: str = "change-me-in-production"
|
|
BASE_URL: str = "http://localhost:8000"
|
|
PASSWORD_RESET_EXPIRE_MINUTES: int = 60
|
|
|
|
EVOTOR_APP_ID: str = ""
|
|
EVOTOR_WEBHOOK_SECRET: str = ""
|
|
|
|
JIVOSITE_WIDGET_ID: str = ""
|
|
VK_DEFAULT_PHOTO_PATH: str = "/app/default_product.png"
|
|
VK_API_VERSION: str = "5.199"
|
|
|
|
CATALOG_REFRESH_INTERVAL_SECONDS: int = 3600
|
|
INVITE_EXPIRE_HOURS: int = 48
|
|
EMAIL_PROVIDER: str = "console"
|
|
SMS_PROVIDER: str = "console"
|
|
SYSTEM_USER_EMAIL: str = ""
|
|
SYSTEM_USER_PASSWORD: str = ""
|
|
|
|
FLOWER_USER: str = "admin"
|
|
FLOWER_PASSWORD: str = "changeme"
|
|
|
|
DB_ROOT_PASSWORD: str = ""
|
|
DB_NAME: str = ""
|
|
DB_USER: str = ""
|
|
DB_PASSWORD: str = ""
|
|
|
|
model_config = {"env_file": ".env", "case_sensitive": False, "extra": "ignore"}
|
|
|
|
|
|
settings = Settings()
|