Browse Source

Merge branch 'logout-devices' into 'master'

Respect logout_devices param on password change

See merge request famedly/conduit!15
merge-requests/15/merge
Devon Hudson 5 years ago
parent
commit
eef6613562
  1. 4
      src/client_server/account.rs

4
src/client_server/account.rs

@ -572,8 +572,7 @@ pub async fn change_password_route(
db.users.set_password(&sender_user, &body.new_password)?; db.users.set_password(&sender_user, &body.new_password)?;
// TODO: Read logout_devices field when it's available and respect that, currently not supported in Ruma if body.logout_devices {
// See: https://github.com/ruma/ruma/issues/107
// Logout all devices except the current one // Logout all devices except the current one
for id in db for id in db
.users .users
@ -583,6 +582,7 @@ pub async fn change_password_route(
{ {
db.users.remove_device(&sender_user, &id)?; db.users.remove_device(&sender_user, &id)?;
} }
}
db.flush().await?; db.flush().await?;

Loading…
Cancel
Save