diff --git a/CHANGELOG.md b/CHANGELOG.md index 57f8411..b4e9e18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ v2.0 - Fix FLEXIAPI-337 Generate the provisioning URLs based on the user space - Fix FLEXIAPI-326 Rework email templates and translations - Fix FLEXIAPI-340 Fix the space resolution when getting the realm on Accounts +- Fix FLEXIAPI-341 Allow realm to be empty when creating a Space v1.6 ---- diff --git a/RELEASE.md b/RELEASE.md index 7c8af26..07c98b7 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,5 @@ # Releases - All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/). diff --git a/flexiapi/app/Http/Controllers/Admin/SpaceController.php b/flexiapi/app/Http/Controllers/Admin/SpaceController.php index c985293..0141887 100644 --- a/flexiapi/app/Http/Controllers/Admin/SpaceController.php +++ b/flexiapi/app/Http/Controllers/Admin/SpaceController.php @@ -67,7 +67,7 @@ class SpaceController extends Controller 'domain' => ['required', 'unique:spaces', new Domain()], 'host' => 'nullable|regex:/'. Space::HOST_REGEX . '/', 'full_host' => ['required', 'unique:spaces,host', new Domain()], - 'account_realm' => [new Domain()], + 'account_realm' => ['nullable', new Domain()], ]); $space = new Space(); diff --git a/flexiapi/app/Http/Controllers/Api/Admin/SpaceController.php b/flexiapi/app/Http/Controllers/Api/Admin/SpaceController.php index 3e5cc6f..d8c41b3 100644 --- a/flexiapi/app/Http/Controllers/Api/Admin/SpaceController.php +++ b/flexiapi/app/Http/Controllers/Api/Admin/SpaceController.php @@ -42,7 +42,8 @@ class SpaceController extends Controller 'host' => ['required', 'unique:spaces', new Domain()], 'max_accounts' => 'nullable|integer', 'expire_at' => 'nullable|date|after_or_equal:today', - 'custom_provisioning_entries' => ['nullable', new Ini(Space::FORBIDDEN_KEYS)] + 'custom_provisioning_entries' => ['nullable', new Ini(Space::FORBIDDEN_KEYS)], + 'account_realm' => ['nullable', new Domain()], ]); $space = new Space; @@ -105,6 +106,7 @@ class SpaceController extends Controller 'max_account' => 'required|integer', 'max_accounts' => 'required|integer', 'expire_at' => 'nullable|date|after_or_equal:today', + 'account_realm' => ['nullable', new Domain()], 'custom_provisioning_entries' => ['nullable', new Ini(Space::FORBIDDEN_KEYS)], 'custom_provisioning_overwrite_all' => 'required|boolean',