mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 04:44:19 +01:00
Secure admin
This commit is contained in:
@@ -36,7 +36,7 @@ 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: ^/admin, roles: ROLE_ADMIN }
|
||||||
# - { path: ^/profile, roles: ROLE_USER }
|
# - { path: ^/profile, roles: ROLE_USER }
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ final class QuizController extends AbstractController
|
|||||||
$candidate = $candidateRepository->getCandidateByHash($season, $nameHash);
|
$candidate = $candidateRepository->getCandidateByHash($season, $nameHash);
|
||||||
|
|
||||||
if (!$candidate instanceof Candidate) {
|
if (!$candidate instanceof Candidate) {
|
||||||
$this->addFlash(FlashType::Danger, 'Candidate not found');
|
$this->addFlash(FlashType::Danger, $this->translator->trans('Candidate not found'));
|
||||||
|
|
||||||
return $this->redirectToRoute('app_quiz_entername', ['seasonCode' => $season->getSeasonCode()]);
|
return $this->redirectToRoute('app_quiz_entername', ['seasonCode' => $season->getSeasonCode()]);
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ final class QuizController extends AbstractController
|
|||||||
$question = $questionRepository->findNextQuestionForCandidate($candidate);
|
$question = $questionRepository->findNextQuestionForCandidate($candidate);
|
||||||
|
|
||||||
if (!$question instanceof Question) {
|
if (!$question instanceof Question) {
|
||||||
$this->addFlash(FlashType::Success, 'Quiz completed');
|
$this->addFlash(FlashType::Success, $this->translator->trans('Quiz completed'));
|
||||||
|
|
||||||
return $this->redirectToRoute('app_quiz_entername', ['seasonCode' => $season->getSeasonCode()]);
|
return $this->redirectToRoute('app_quiz_entername', ['seasonCode' => $season->getSeasonCode()]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ final class RegistrationController extends AbstractController
|
|||||||
return $this->redirectToRoute('app_register');
|
return $this->redirectToRoute('app_register');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->addFlash('success', 'Your email address has been verified.');
|
$this->addFlash('success', $this->translator->trans('Your email address has been verified.'));
|
||||||
|
|
||||||
return $this->redirectToRoute('app_backoffice_index');
|
return $this->redirectToRoute('app_backoffice_index');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
'All Seasons': 'Alle seizoenen'
|
'All Seasons': 'Alle seizoenen'
|
||||||
'Already have an account? Log in': 'Heb je al een account? Log in'
|
'Already have an account? Log in': 'Heb je al een account? Log in'
|
||||||
Candidate: Kandidaat
|
Candidate: Kandidaat
|
||||||
|
'Candidate not found': 'Kandidaat niet gevonden'
|
||||||
Candidates: Kandidaten
|
Candidates: Kandidaten
|
||||||
'Correct Answers': 'Goede antwoorden'
|
'Correct Answers': 'Goede antwoorden'
|
||||||
Corrections: Jokers
|
Corrections: Jokers
|
||||||
@@ -22,6 +23,7 @@ Password: Wachtwoord
|
|||||||
'Prepare Custom Elimination': 'Bereid aangepaste eliminatie voor'
|
'Prepare Custom Elimination': 'Bereid aangepaste eliminatie voor'
|
||||||
Questions: Vragen
|
Questions: Vragen
|
||||||
Quiz: Test
|
Quiz: Test
|
||||||
|
'Quiz completed': 'Test voltooid'
|
||||||
Quizzes: Tests
|
Quizzes: Tests
|
||||||
Register: Registreren
|
Register: Registreren
|
||||||
'Remember me': 'Onthoud mij'
|
'Remember me': 'Onthoud mij'
|
||||||
@@ -34,3 +36,4 @@ Seasons: Seizoenen
|
|||||||
'There are no answers for this question': 'Er zijn geen antwoorden voor deze vraag'
|
'There are no answers for this question': 'Er zijn geen antwoorden voor deze vraag'
|
||||||
Time: Tijd
|
Time: Tijd
|
||||||
'Your Seasons': 'Jouw seizoenen'
|
'Your Seasons': 'Jouw seizoenen'
|
||||||
|
'Your email address has been verified.': 'Je e-mailadres is geverifieerd.'
|
||||||
|
|||||||
Reference in New Issue
Block a user