Compare commits

...

7 Commits

Author SHA1 Message Date
github-actions[bot]
6dd2627a6a Merge pull request #11424 from firefly-iii/release-1767125383
🤖 Automatically merge the PR into the develop branch.
2025-12-30 21:09:52 +01:00
JC5
22074568ae 🤖 Auto commit for release 'develop' on 2025-12-30 2025-12-30 21:09:43 +01:00
James Cole
df03899588 Fix whoopsie. 2025-12-30 21:05:50 +01:00
github-actions[bot]
7f4f95097b Merge pull request #11423 from firefly-iii/release-1767124577
🤖 Automatically merge the PR into the develop branch.
2025-12-30 20:56:26 +01:00
JC5
c96ada053f 🤖 Auto commit for release 'develop' on 2025-12-30 2025-12-30 20:56:17 +01:00
James Cole
523ec7c0a1 Expand settings, make accounts not mandatory. 2025-12-30 20:51:56 +01:00
James Cole
61444e9660 New variables for updates. 2025-12-30 16:39:46 +01:00
4 changed files with 20 additions and 12 deletions

View File

@@ -79,8 +79,8 @@ class UpdateRequest extends FormRequest
'start_date' => 'date|nullable',
'target_date' => 'date|nullable|after:start_date',
'notes' => 'max:65000',
'accounts' => 'required',
'accounts.*' => 'array|required',
'accounts' => 'array',
'accounts.*' => 'array',
'accounts.*.account_id' => ['required', 'numeric', 'belongsToUser:accounts,id'],
'accounts.*.current_amount' => ['numeric', 'nullable', new IsValidZeroOrMoreAmount(true)],
'object_group_id' => 'numeric|belongsToUser:object_groups,id',

View File

@@ -37,17 +37,19 @@ class UpdateRequest extends FormRequest
use ChecksLogin;
use ConvertsDataTypes;
private array $booleans = ['configuration.is_demo_site', 'configuration.single_user_mode', 'configuration.enable_exchange_rates', 'configuration.use_running_balance', 'configuration.enable_external_map', 'configuration.enable_external_rates', 'configuration.allow_webhooks'];
private array $integers = ['configuration.permission_update_check', 'configuration.last_update_check'];
/**
* Get all data from the request.
*/
public function getAll(): array
{
$name = $this->route()->parameter('dynamicConfigKey');
if ('configuration.is_demo_site' === $name || 'configuration.single_user_mode' === $name) {
if (in_array($name, $this->booleans, true)) {
return ['value' => $this->boolean('value')];
}
if ('configuration.permission_update_check' === $name || 'configuration.last_update_check' === $name) {
if (in_array($name, $this->integers, true)) {
return ['value' => $this->convertInteger('value')];
}
@@ -61,13 +63,13 @@ class UpdateRequest extends FormRequest
{
$name = $this->route()->parameter('configName');
if ('configuration.is_demo_site' === $name || 'configuration.single_user_mode' === $name) {
if (in_array($name, $this->booleans, true)) {
return ['value' => ['required', new IsBoolean()]];
}
if ('configuration.permission_update_check' === $name) {
return ['value' => 'required|numeric|min:-1|max:1'];
}
if ('configuration.last_update_check' === $name) {
if (in_array($name, $this->integers, true)) {
return ['value' => 'required|numeric|min:464272080'];
}

View File

@@ -34,10 +34,16 @@ class DynamicConfigKey
{
public static array $accepted
= [
'configuration.is_demo_site',
'configuration.permission_update_check',
'configuration.single_user_mode',
'configuration.last_update_check',
'configuration.is_demo_site', // boolean
'configuration.permission_update_check', // -1, 0 or 1 (never asked, no permission, permission)
'configuration.single_user_mode', // boolean
'configuration.last_update_check', // timestamp
'configuration.enable_exchange_rates', // boolean
'configuration.use_running_balance', // boolean
'configuration.enable_external_map', // boolean
'configuration.enable_external_rates', // boolean
'configuration.allow_webhooks', // boolean
'configuration.valid_url_protocols', // string ("http,https")
];
/**

View File

@@ -79,7 +79,7 @@ return [
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2025-12-30',
'build_time' => 1767107843,
'build_time' => 1767125279,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.