feat: Suspend new users on registration

This commit is contained in:
nexy7574 2025-07-02 00:41:34 +01:00 committed by Ellis Git
commit 6e60918584
4 changed files with 57 additions and 1 deletions

View file

@ -513,6 +513,17 @@ pub struct Config {
#[serde(default)]
pub allow_registration: bool,
/// If registration is enabled, and this setting is true, new users
/// registered after the first admin user will be automatically suspended
/// and will require an admin to run `!admin users unsuspend <user_id>`.
///
/// Suspended users are still able to read messages, make profile updates,
/// leave rooms, and deactivate their account, however cannot send messages,
/// invites, or create/join or otherwise modify rooms.
/// They are effectively read-only.
#[serde(default)]
pub suspend_on_register: bool,
/// Enabling this setting opens registration to anyone without restrictions.
/// This makes your server vulnerable to abuse
#[serde(default)]