Private
Public Access
Site admins can invite a brand-new person by email from the Admin portal Users tab -- a signup-link email lets them set their own username/password and lands them in the app already logged in. Existing users invited to a room now also get an email. Closes the "invited but never notified" gap from both directions. SMTP is configured through the Admin Settings tab at runtime (not the env file), persisted in a new smtp_settings table with the password encrypted at rest via a Fernet key derived from SESSION_SECRET -- the first reversible secret this app stores in the database. A "send test email" button surfaces real delivery errors; the invite/notification paths themselves never fail loudly, since an SMTP outage shouldn't block an action that already succeeded in the database. New site_invites table mirrors RoomInvite's shape but targets an email address with no room context; the raw signup token is hashed the same way API tokens are, and only ever exists in the email link. POST /api/signup is the first genuinely public, unauthenticated account-creation endpoint in this app, reusing the existing register_user path for identical validation.
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
from app.models.admin_audit_log import AdminAuditLog
|
|
from app.models.api_token import ApiToken
|
|
from app.models.base import Base
|
|
from app.models.event_subscription import EventSubscription
|
|
from app.models.invite import InviteStatus, RoomInvite
|
|
from app.models.membership import RoomMembership, RoomRole
|
|
from app.models.message import Message
|
|
from app.models.message_image import MessageImage
|
|
from app.models.message_reaction import MessageReaction
|
|
from app.models.push_subscription import PushSubscription
|
|
from app.models.room import Room
|
|
from app.models.site_invite import SiteInvite
|
|
from app.models.smtp_settings import SmtpSettings
|
|
from app.models.user import User
|
|
from app.models.webhook_incoming import WebhookIncoming
|
|
|
|
__all__ = [
|
|
"Base",
|
|
"User",
|
|
"Room",
|
|
"RoomMembership",
|
|
"RoomRole",
|
|
"Message",
|
|
"MessageImage",
|
|
"MessageReaction",
|
|
"RoomInvite",
|
|
"InviteStatus",
|
|
"SiteInvite",
|
|
"SmtpSettings",
|
|
"PushSubscription",
|
|
"AdminAuditLog",
|
|
"ApiToken",
|
|
"WebhookIncoming",
|
|
"EventSubscription",
|
|
]
|