From f0a1e6615c147f740ee1ec0bb6f06ca9e450cc98 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 26 Dec 2023 22:37:29 +0100 Subject: disable admin account by default for sane default config --- common/src/config.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'common/src') diff --git a/common/src/config.rs b/common/src/config.rs index a520fe0..7328d6e 100644 --- a/common/src/config.rs +++ b/common/src/config.rs @@ -20,10 +20,10 @@ pub struct GlobalConfig { #[serde(default = "default::temp_path")] pub temp_path: PathBuf, #[serde(default = "default::cache_path")] pub cache_path: PathBuf, #[serde(default = "default::media_path")] pub media_path: PathBuf, - #[serde(default = "default::admin_username")] pub admin_username: String, #[serde(default = "default::transcoding_profiles")] pub transcoding_profiles: Vec, #[serde(default = "default::max_in_memory_cache_size")] pub max_in_memory_cache_size: usize, - pub admin_password: String, + #[serde(default)] pub admin_username: Option, + #[serde(default)] pub admin_password: Option, #[serde(default)] pub cookie_key: Option, #[serde(default)] pub session_key: Option, #[serde(default = "default::login_expire")] pub login_expire: i64, @@ -33,13 +33,9 @@ pub struct GlobalConfig { } mod default { - use std::path::PathBuf; - use crate::jhls::EncodingProfile; + use std::path::PathBuf; - pub fn admin_username() -> String { - "admin".into() - } pub fn login_expire() -> i64 { 60 * 60 * 24 } -- cgit v1.2.3-70-g09d2