1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add config flag to disable registration

This commit is contained in:
NG (Graham)
2026-03-24 17:19:18 -04:00
parent 56e4239c08
commit 6de195c1f2
5 changed files with 46 additions and 10 deletions

View File

@@ -293,6 +293,7 @@ impl <C: Clone + Send> super::ConfigProvider<C> for CubeConfig {
super::ServerConfig {
database: self.settings.server.database.clone(),
auto_signup: self.settings.server.auto_signup,
allow_signup: self.settings.server.allow_signup,
queue_mode: super::QueueChangeMode::from_persist(self.settings.server.queue_mode.clone()),
domain: self.settings.server.domain.to_owned(),
cdn_url: self.settings.server.cdn_url.trim_end_matches('/').to_owned(),

View File

@@ -92,6 +92,7 @@ pub struct TypedDevMessage<C> {
pub struct ServerConfig {
pub database: String,
pub auto_signup: bool,
pub allow_signup: bool,
pub queue_mode: QueueChangeMode,
pub domain: String,
pub cdn_url: String,

View File

@@ -83,6 +83,8 @@ pub struct ServerSettings {
pub database: String,
#[serde(default)]
pub auto_signup: bool,
#[serde(default = "default_true")]
pub allow_signup: bool,
#[serde(default)]
pub queue_mode: QueueMode,
#[serde(default = "default_domain_root")]
@@ -123,6 +125,7 @@ fn default_server_conf() -> ServerSettings {
ServerSettings {
database: default_db_conn(),
auto_signup: false,
allow_signup: true,
queue_mode: QueueMode::Notify,
domain: default_domain_root(),
cdn_url: default_cdn_root_url(),