feat: add new ENV to set token for root user (#6438)

This commit is contained in:
Hengfei Yang
2025-04-01 12:27:11 +08:00
committed by GitHub
parent 98e4ea21c1
commit 871f954fe2
10 changed files with 38 additions and 8 deletions
+5 -1
View File
@@ -252,7 +252,11 @@ pub async fn cli() -> Result<bool, anyhow::Error> {
role: Some(meta::user::UserRole::Root),
first_name: Some("root".to_owned()),
last_name: Some("".to_owned()),
token: None,
token: if cfg.auth.root_user_token.is_empty() {
None
} else {
Some(cfg.auth.root_user_token.clone())
},
},
)
.await?;