Move get_config in startup to admin branch to scope down usage (#238)

This commit is contained in:
zainkabani
2022-11-17 09:22:12 -08:00
committed by GitHub
parent 5145b20e02
commit fcd2cae4e1

View File

@@ -367,7 +367,6 @@ where
shutdown: Receiver<()>,
admin_only: bool,
) -> Result<Client<S, T>, Error> {
let config = get_config();
let stats = get_reporter();
let parameters = parse_startup(bytes.clone())?;
@@ -440,6 +439,7 @@ where
// Authenticate admin user.
let (transaction_mode, server_info) = if admin {
let config = get_config();
// Compare server and client hashes.
let password_hash = md5_hash_password(
&config.general.admin_username,