From fbc940412c7b36eb2555be563355bdfe0edbb3ba Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 21 Aug 2019 23:48:24 +0200 Subject: [PATCH] When signups are prohibited, respond with HTTP 403 --- framework/core/src/User/Command/RegisterUserHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/User/Command/RegisterUserHandler.php b/framework/core/src/User/Command/RegisterUserHandler.php index e839e1c2b..f2d1818f8 100644 --- a/framework/core/src/User/Command/RegisterUserHandler.php +++ b/framework/core/src/User/Command/RegisterUserHandler.php @@ -74,7 +74,7 @@ class RegisterUserHandler $data = $command->data; if (! $this->settings->get('allow_sign_up')) { - $this->assertAdmin($actor); + $this->assertPermission($actor->can('administrate')); } $password = Arr::get($data, 'attributes.password');