fix missing MFA session events#2371
Conversation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if location.mfa_enabled() { | ||
| // FIXME: remove once MFA-related data is no longer stored here | ||
| // update device network config | ||
| if let Some(mut device_network_info) = | ||
| WireguardNetworkDevice::find(&mut *transaction, device.id, location.id).await? | ||
| { | ||
| device_network_info.is_authorized = false; | ||
| device_network_info.preshared_key = None; | ||
| device_network_info.update(&mut *transaction).await?; |
| self.send_peer_disconnect_message(location, &device)?; | ||
| } |
| peer_stats_update: PeerStatsUpdate, | ||
| event_tx: &UnboundedSender<SessionManagerEvent>, | ||
| ) -> Result<(), SessionManagerError> { | ||
| // mark new MFA session as connected if necessary |
Add missing MFA-connected event. Also handle emitting events during MFA re-authorization.
Closes #2356 and #1965