Enrollment settings#2433
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated Enrollment page in the web UI for enrollment-related settings, adds a backend/frontend settings flag to disable sending welcome emails, and relocates password-reset timeout settings to the Instance settings page.
Changes:
- Add
/enrollmentroute and UI (tabs for General + Message templates) and link it in main navigation. - Add
enrollment_send_welcome_emailsetting (DB migration + backend model + server behavior + frontend types/UI). - Move password-reset timeout settings into Instance settings; remove the old Settings Enrollment page/route.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/shared/form.tsx | Refactors form context wiring to import contexts from a new module. |
| web/src/shared/form-context.tsx | New shared module exporting TanStack form hook contexts. |
| web/src/shared/components/Navigation/Navigation.tsx | Adds “Enrollment” item linking to /enrollment. |
| web/src/shared/components/FormSelectMultiple/FormSelectMultiple.tsx | Updates context import to the new form-context module. |
| web/src/shared/api/types.ts | Extends SettingsEnrollment with enrollment_send_welcome_email. |
| web/src/routes/_authorized/_default/settings/enrollment.tsx | Removes old /settings/enrollment route. |
| web/src/routes/_authorized/_default/enrollment.tsx | Adds new /enrollment route. |
| web/src/routeTree.gen.ts | Updates generated route tree for the new route and removal of the old one. |
| web/src/pages/settings/SettingsInstancePage/SettingsInstancePage.tsx | Adds password-reset timeout controls to Instance settings. |
| web/src/pages/settings/SettingsIndexPage/tabs/SettingsGeneralTab.tsx | Removes link to the old settings enrollment page. |
| web/src/pages/settings/SettingsEnrollmentPage/SettingsEnrollmentPage.tsx | Removes the old Settings Enrollment page implementation. |
| web/src/pages/EnrollmentPage/tabs/MessageTemplatesTab.tsx | New UI for welcome message + welcome email template/settings (includes new toggle). |
| web/src/pages/EnrollmentPage/tabs/GeneralTab.tsx | New UI for enrollment token/session duration settings. |
| web/src/pages/EnrollmentPage/style.scss | Adds styling for the Enrollment page layout and help sidebar. |
| web/src/pages/EnrollmentPage/EnrollmentPage.tsx | Adds the Enrollment page container with tabs. |
| web/messages/en/settings.json | Adds/updates strings for the new Enrollment page and Instance password section. |
| web/messages/en/components.json | Adds “Enrollment” nav item label. |
| migrations/20260323083929_[2.0.0]_enrollment_settings.up.sql | Adds enrollment_send_welcome_email column with default TRUE. |
| migrations/20260323083929_[2.0.0]_enrollment_settings.down.sql | Drops the new column on rollback. |
| crates/defguard_proxy_manager/src/servers/enrollment.rs | Skips welcome email sending when disabled; adds a test. |
| crates/defguard_common/src/db/models/settings.rs | Adds the new field to Settings model + SQL queries/debug output. |
| .sqlx/query-37bce7….json | Updates sqlx metadata for Settings SELECT including the new field. |
| .sqlx/query-0c5875….json | Updates sqlx metadata for Settings UPDATE including the new field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
moubctez
reviewed
Mar 24, 2026
filipslezaklab
requested changes
Mar 24, 2026
Contributor
filipslezaklab
left a comment
There was a problem hiding this comment.
Use already present layout element instead of inventing new ones. Extend current settings layout to support the "tricks" / explain card on the right.
filipslezaklab
approved these changes
Mar 25, 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.
Related issue: #2268