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