10 Commits

Author SHA1 Message Date
Oliver Günther 02ae6a9119 Remove password min-rules in favor of clearly listed/checked password rules
https://community.openproject.org/work_packages/73461
2026-04-22 13:43:42 +02:00
Alexander Brandon Coles dd8ead6456 Fix missing copyright notices in app/models 2025-07-22 18:26:13 +01:00
Alexander Brandon Coles d17da65477 Freeze string literals in app/models
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/models
2025-07-22 18:26:13 +01:00
Christophe Bliard 3416068da9 refactor: simplify filters for permitted params
`ActionController::Parameters#permit` takes a list of filters. There is
no kwargs argument.

Co-authored-by: Klaus Zanders <k.zanders@openproject.com>
2024-05-27 09:10:56 +02:00
Christophe Bliard c6f332620f Avoid misleading "Unpermitted parameters: xxx" log
When `PermittedParams#settings` was called, it was not permitting any
params, which lead to "Unpermitted parameters: ..." messages being
logged, and then merged the resulting empty params with the controller
params after having filtered them manually. It was ok-ish but the logged
error message was misleading.

The `#settings` method was refactored to permit params that are allowed
in a single step and avoid the misleading log messages.
2024-05-24 17:46:32 +02:00
Christophe Bliard c0a45951f1 Restore some authentication settings in admin
Also makes ckEditorAugmentedTextarea read-only if the wrapped text area
is disabled.

As for the invitation_expiration_days setting, commit 269f9416dd and
commit 286d862c38 got intertwined with merge commit eb63698a3d, and
resulted in hiding the setting when
`OpenProject::Configuration.registration_footer` is set.

As for the registration_footer setting, PR #6321 intent was to prevent
modifying it if it was already set via env var or configuration file.
When `OpenProject::Configuration` and `Settings` were merged, this code
was not updated. With the default value being non-blank, it lead to
hiding the setting from the administration pages.

This commit restores both settings.
2023-06-12 16:22:11 +02:00
Pavel Balashov fc63e5a65c Remove Setting.definitions.
In favor for `Settings::Definition.all`.
Let's have one way for getting the list of core settings definitions.
2023-02-23 20:46:57 +01:00
Pavel Balashov c5d75459dd [#45965] Setting definitions validations access nonloaded constants
https://community.openproject.org/work_packages/45965
2023-02-22 16:03:50 +01:00
ulferts 0b5575aa64 harmonize settings & configuration
They are for now still available as separate entities but that is more due to existing references to them both. Under the hood, they now depend on the
same structure `Settings::Definition` which just as well could have been named `Configuration::Definition`, that defines:
* the name
* the default value
* the type (which might be deferred from the default value)
* the array of allowed values

Both Setting and Configuration can now be overwritten using the same mechanisms:
* Default value
* Database value
* configuration.yml (settings.yml is removed)
* ENV vars
2022-03-14 13:37:22 +01:00
Markus Kahl bfb9601d76 registration footer override 2018-05-17 11:25:03 +01:00