diff --git a/src/admin/token/commands.rs b/src/admin/token/commands.rs index b33542fc1..a3ddeff49 100644 --- a/src/admin/token/commands.rs +++ b/src/admin/token/commands.rs @@ -4,6 +4,9 @@ impl crate::Context<'_> { pub(super) async fn issue_registration_token(&self, expires: super::TokenExpires) -> Result { + if !self.services.config.allow_registration { + return Err!("Registration has been disabled on this homeserver."); + } let expires = { if expires.immortal { None