fix(password): has_local_permanent_password()

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2026-03-22 15:36:22 +08:00
parent 325b8841ea
commit 6bc0ee0e8f

View File

@@ -1381,6 +1381,10 @@ impl Config {
.map_or(false, |v| !v.is_empty()) .map_or(false, |v| !v.is_empty())
} }
pub fn has_local_permanent_password() -> bool {
!CONFIG.read().unwrap().password.is_empty()
}
pub fn set_salt(salt: &str) { pub fn set_salt(salt: &str) {
let mut config = CONFIG.write().unwrap(); let mut config = CONFIG.write().unwrap();
if salt == config.salt { if salt == config.salt {