Skip to content
Snippets Groups Projects
Commit f7b2c73e authored by Camille Simiand's avatar Camille Simiand
Browse files

Update access control roles for my capsules page

parent 65851326
No related branches found
No related tags found
1 merge request!21Fix - Non authenticated user can't access capsule list page
......@@ -36,5 +36,5 @@ security:
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
# - { path: ^/admin, roles: ROLE_ADMIN }
# - { path: ^/profile, roles: ROLE_USER }
- { path: ^/my_capsules, roles: ROLE_USER }
......@@ -13,10 +13,6 @@ class CapsuleController extends AbstractController
*/
public function index(): Response
{
if (! $this->getUser()) {
return $this->redirectToRoute('app_login');
}
return $this->render('capsule/index.html.twig', [
'controller_name' => 'CapsuleController',
]);
......
......@@ -44,7 +44,7 @@ class RegistrationControllerTest extends WebTestCase
$this->registerUser($userEmail, $client);
$this->checkEmailHasBeenSentAndGetEmail($userEmail);
$this->checkEmailHasBeenSentAndGetEmailMessage($userEmail);
}
public function testEmailValidationRegistrationShouldEnableUser(): void
......@@ -53,7 +53,7 @@ class RegistrationControllerTest extends WebTestCase
$client = static::createClient();
$this->registerUser($userEmail, $client);
$emailMessage = $this->checkEmailHasBeenSentAndGetEmail($userEmail);
$emailMessage = $this->checkEmailHasBeenSentAndGetEmailMessage($userEmail);
$client->followRedirect();
$this->clickOnEmailMessageLink($emailMessage, $client);
......@@ -81,7 +81,7 @@ class RegistrationControllerTest extends WebTestCase
* @param string $userEmail The registered user email
* @return RawMessage The email message sent to the user
*/
private function checkEmailHasBeenSentAndGetEmail(string $userEmail): RawMessage
private function checkEmailHasBeenSentAndGetEmailMessage(string $userEmail): RawMessage
{
$this->assertEmailCount(
1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment