From 023c16e4f444d9c185507b69bc60d45af62f5bed Mon Sep 17 00:00:00 2001 From: strawberry Date: Sat, 2 Mar 2024 22:17:34 -0500 Subject: [PATCH] specify if registration token is set in show-config Signed-off-by: strawberry --- conduwuit-example.toml | 2 +- src/config/mod.rs | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/conduwuit-example.toml b/conduwuit-example.toml index 7d1cec88..f966977e 100644 --- a/conduwuit-example.toml +++ b/conduwuit-example.toml @@ -126,7 +126,7 @@ allow_guest_registration = false # No default. # prevent_media_downloads_from = ["example.com", "example.local"] -# Enables open registration. If set to false, no users can register on this +# Enables registration. If set to false, no users can register on this # server. # If set to true without a token configured, users can register with no form of 2nd- # step only if you set diff --git a/src/config/mod.rs b/src/config/mod.rs index c2b89e01..4f154dae 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -249,17 +249,24 @@ impl fmt::Display for Config { "Cleanup interval in seconds", &self.cleanup_second_interval.to_string(), ), - ("Maximum request size", &self.max_request_size.to_string()), + ("Maximum request size (bytes)", &self.max_request_size.to_string()), ( "Maximum concurrent requests", &self.max_concurrent_requests.to_string(), ), ( - "Allow registration (open registration)", + "Allow registration", &self.allow_registration.to_string(), ), ( - "Allow guest registration", + "Registration token", + match self.registration_token { + Some(_) => "set", + None => "not set (open registration!)", + }, + ), + ( + "Allow guest registration (inherently false if allow registration is false)", &self.allow_guest_registration.to_string(), ), (