lock registration
This commit is contained in:
parent
79afe43010
commit
edf48de9b7
2 changed files with 3 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ security:
|
|||
# Note: Only the *first* matching rule is applied
|
||||
access_control:
|
||||
- { path: ^/brain, roles: ROLE_ADMIN }
|
||||
- { path: /letmein/register, roles: ROLE_ADMIN }
|
||||
# - { path: ^/profile, roles: ROLE_USER }
|
||||
|
||||
when@test:
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ class RegistrationController extends AbstractController
|
|||
#[Route('/letmein/register', name: 'app_register')]
|
||||
public function register(Request $request, UserPasswordHasherInterface $userPasswordHasher, EntityManagerInterface $entityManager): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_ADMIN');
|
||||
|
||||
$user = new User();
|
||||
$form = $this->createForm(RegistrationFormType::class, $user);
|
||||
$form->handleRequest($request);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue