add missing disconnect threshold input#2365
Merged
Merged
Conversation
filipslezaklab
previously approved these changes
Mar 16, 2026
There was a problem hiding this comment.
Pull request overview
Adds the missing “Client disconnect threshold” control to the Location edit UI when MFA is enabled, and aligns backend validation + tests to enforce the same minimum threshold.
Changes:
- Web: show
peer_disconnect_thresholdinput on Edit Location whenlocation_mfa_modeis Internal/External, with conditional validation (required + min 120). - Core API: validate
peer_disconnect_threshold >= 120whenever location MFA is enabled (create + modify). - Tests/deps: add integration coverage for the new validation and bump
motiondependency (plus lockfile / flake.lock refresh).
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/src/pages/EditLocationPage/EditLocationPage.tsx | Adds conditional disconnect-threshold field + validation tied to MFA state; ensures value is sent on edit. |
| crates/defguard_core/src/handlers/wireguard.rs | Adds server-side validation enforcing minimum disconnect threshold when MFA is enabled. |
| crates/defguard_core/tests/integration/api/wireguard.rs | Adds integration tests for the new create/modify validation behavior. |
| web/package.json | Bumps motion to ^12.37.0. |
| web/pnpm-lock.yaml | Lockfile updates for the motion bump (and related packages). |
| flake.lock | Updates pinned Nix inputs (nixpkgs / rust-overlay). |
Files not reviewed (1)
- web/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
moubctez
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds missing client disconnect threshold to location edit form.
Closes #2357