Skip to content

Enrollment settings#2433

Merged
j-chmielewski merged 34 commits into
devfrom
enrollment-settings
Mar 25, 2026
Merged

Enrollment settings#2433
j-chmielewski merged 34 commits into
devfrom
enrollment-settings

Conversation

@j-chmielewski
Copy link
Copy Markdown
Contributor

@j-chmielewski j-chmielewski commented Mar 23, 2026

Related issue: #2268

  • Introduces "Enrollment" page with enrollment-related settings
  • Introduces "send welcome email" settings flag
  • Moves enrollment-related settings to "Enrollment" page
  • Moves password-reset-related settings to "Instance" settings page

@j-chmielewski j-chmielewski marked this pull request as ready for review March 24, 2026 11:13
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

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 /enrollment route and UI (tabs for General + Message templates) and link it in main navigation.
  • Add enrollment_send_welcome_email setting (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.

Comment thread crates/defguard_proxy_manager/src/servers/enrollment.rs
Comment thread web/src/pages/EnrollmentPage/tabs/MessageTemplatesTab.tsx
Comment thread web/src/pages/EnrollmentPage/tabs/MessageTemplatesTab.tsx Outdated
Comment thread web/src/pages/EnrollmentPage/style.scss Outdated
Comment thread crates/defguard_common/src/db/models/settings.rs
@j-chmielewski j-chmielewski self-assigned this Mar 24, 2026
Comment thread crates/defguard_proxy_manager/src/servers/enrollment.rs Outdated
Copy link
Copy Markdown
Contributor

@filipslezaklab filipslezaklab left a comment

Choose a reason for hiding this comment

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

Use already present layout element instead of inventing new ones. Extend current settings layout to support the "tricks" / explain card on the right.

@j-chmielewski j-chmielewski merged commit 385132e into dev Mar 25, 2026
3 checks passed
@j-chmielewski j-chmielewski deleted the enrollment-settings branch March 25, 2026 10:34
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