Skip to content

add missing disconnect threshold input#2365

Merged
wojcik91 merged 6 commits into
devfrom
fix_add_disconnect_threshold
Mar 17, 2026
Merged

add missing disconnect threshold input#2365
wojcik91 merged 6 commits into
devfrom
fix_add_disconnect_threshold

Conversation

@wojcik91
Copy link
Copy Markdown
Contributor

Adds missing client disconnect threshold to location edit form.

Closes #2357

@wojcik91 wojcik91 self-assigned this Mar 16, 2026
filipslezaklab
filipslezaklab previously approved these changes Mar 16, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_threshold input on Edit Location when location_mfa_mode is Internal/External, with conditional validation (required + min 120).
  • Core API: validate peer_disconnect_threshold >= 120 whenever location MFA is enabled (create + modify).
  • Tests/deps: add integration coverage for the new validation and bump motion dependency (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.

Comment thread crates/defguard_core/src/handlers/wireguard.rs Outdated
@wojcik91 wojcik91 merged commit f288272 into dev Mar 17, 2026
3 checks passed
@wojcik91 wojcik91 deleted the fix_add_disconnect_threshold branch March 17, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants