log out any sessions when the server emergency password is unset

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-06-12 02:28:52 -04:00 committed by June 🍓🦴
parent 556e78214a
commit d0069cc100

View file

@ -42,9 +42,12 @@ fn set_emergency_access() -> Result<bool> {
if pwd_set { if pwd_set {
warn!( warn!(
"The Conduit account emergency password is set! Please unset it as soon as you finish admin account \ "The server account emergency password is set! Please unset it as soon as you finish admin account \
recovery!" recovery! You will be logged out of the server service account when you finish."
); );
} else {
// logs out any users still in the server service account and removes sessions
services().users.deactivate_account(conduit_user)?;
} }
Ok(pwd_set) Ok(pwd_set)