Skip to content

Conversation

@0x46616c6b
Copy link
Member

@0x46616c6b 0x46616c6b commented Sep 16, 2025

This pull request introduces a new, extensible system for managing application settings, including the configuration, persistence, form display, and update functionality. It adds a YAML-based settings definition, a database-backed entity for storing settings, and updates the controller logic and feature tests to support viewing and updating settings through the UI. The changes also refactor and split feature tests for API tokens and webhooks into dedicated files for better organization.

Screenshot 2025-09-17 at 20-17-03 example org - Settings Screenshot 2025-09-17 at 20-17-11 example org - Settings

@0x46616c6b 0x46616c6b added the enhancement New feature or request label Sep 16, 2025
SENDER_ADDRESS="admin@example.org"
NOTIFICATION_ADDRESS="monitoring@example.org"
SEND_MAIL=1
LOCALE="en"
Copy link
Member Author

Choose a reason for hiding this comment

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

not used.

# For a generic SMTP server, use: "smtp://localhost:25"
# Delivery is disabled by default via "null://null"
MAILER_DSN="null://null"
MAILER_DELIVERY_ADDRESS="admin@example.org"
Copy link
Member Author

Choose a reason for hiding this comment

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

not used.

Comment on lines -26 to -39
RETENTION_API_ENABLED=true
RETENTION_API_ACCESS_TOKEN="retention"
RETENTION_API_IP_ALLOWLIST="127.0.0.1, ::1"
KEYCLOAK_API_ENABLED=true
KEYCLOAK_API_ACCESS_TOKEN="keycloak"
KEYCLOAK_API_IP_ALLOWLIST="127.0.0.1, ::1"
POSTFIX_API_ENABLED=true
POSTFIX_API_ACCESS_TOKEN="postfix"
POSTFIX_API_IP_ALLOWLIST="127.0.0.1, ::1"
ROUNDCUBE_API_ENABLED=true
ROUNDCUBE_API_IP_ALLOWLIST="127.0.0.1, ::1"
DOVECOT_API_ENABLED=true
DOVECOT_API_ACCESS_TOKEN="dovecot"
DOVECOT_API_IP_ALLOWLIST="127.0.0.1, ::1"
Copy link
Member Author

Choose a reason for hiding this comment

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

not used.

@0x46616c6b 0x46616c6b marked this pull request as ready for review September 17, 2025 18:19
@0x46616c6b 0x46616c6b requested a review from Copilot September 18, 2025 05:59
Copy link

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 pull request introduces a comprehensive settings management system that provides a configurable, database-backed solution for managing application settings. It includes YAML-based configuration definitions, a database entity for persistence, form-based UI for updates, and caching for performance optimization.

Key changes include:

  • A new Settings entity and repository for database persistence
  • Service layer with configuration and business logic for settings management
  • Form integration with validation and type conversion
  • Template updates for the settings UI with improved navigation and form display

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Entity/Setting.php New database entity for storing settings with timestamps
src/Service/SettingsService.php Core service handling settings CRUD operations with caching
src/Service/SettingsConfigService.php Configuration service loading YAML-based settings definitions
src/Form/SettingsType.php Dynamic form builder creating fields based on configuration
templates/Settings/show.html.twig Updated settings template with form display and categorization
config/settings.yaml YAML configuration defining available settings with validation rules
tests/ Comprehensive test coverage for all new components
features/ Split feature tests into separate files for better organization

@sonarqubecloud
Copy link

@0x46616c6b 0x46616c6b merged commit 57ab6a8 into main Sep 22, 2025
12 checks passed
@0x46616c6b 0x46616c6b deleted the Introduce-configurable-Settings branch September 22, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants