diff --git a/sourcecode/hub/app/Providers/AuthServiceProvider.php b/sourcecode/hub/app/Providers/AuthServiceProvider.php index 6456bb1e37..d06696e6f1 100644 --- a/sourcecode/hub/app/Providers/AuthServiceProvider.php +++ b/sourcecode/hub/app/Providers/AuthServiceProvider.php @@ -58,7 +58,7 @@ public function boot(): void Gate::define('reset-password', function (User|null $user) { $features = app()->make(Features::class); - return $features->isSignupEnabled(); + return $features->isForgotPasswordEnabled(); }); } } diff --git a/sourcecode/hub/tests/Feature/UserTest.php b/sourcecode/hub/tests/Feature/UserTest.php index 1ced3b28d2..a83994379a 100644 --- a/sourcecode/hub/tests/Feature/UserTest.php +++ b/sourcecode/hub/tests/Feature/UserTest.php @@ -24,9 +24,9 @@ public function testSignupsAreUsuallyEnabled(): void public function testSignupCanBeDisabled(): void { - config(['features.sign-up' => false]); + config()->set('features.sign-up', false); - $this->get('/register')->assertNotFound(); + $this->get('/register')->assertForbidden(); } public function testForgotPasswordIsUsuallyEnabled(): void @@ -36,9 +36,9 @@ public function testForgotPasswordIsUsuallyEnabled(): void public function testForgotPasswordCanBeDisabled(): void { - config(['features.forgot-password' => false]); + config()->set('features.forgot-password', false); - $this->get('/forgot-password')->assertNotFound(); + $this->get('/forgot-password')->assertForbidden(); } public function testSerialisation(): void