Fix keyword collision in Rust 2024 and add new api/config value (#4975)

* Avoid keyword collision with gen in Rust 2024

* Include new api/config setting to disable user registration, not yet used by clients

* Actually qualify CONFIG
This commit is contained in:
Daniel García
2024-09-20 21:39:00 +02:00
committed by GitHub
parent 7d6dec6413
commit d184c8f08c
2 changed files with 13 additions and 10 deletions

View File

@@ -204,6 +204,9 @@ fn config() -> Json<Value> {
"name": "Vaultwarden",
"url": "https://github.com/dani-garcia/vaultwarden"
},
"settings": {
"disableUserRegistration": !crate::CONFIG.signups_allowed() && crate::CONFIG.signups_domains_whitelist().is_empty(),
},
"environment": {
"vault": domain,
"api": format!("{domain}/api"),