Browse Source

Correction du bug quand non loggé

François Drouhard 3 years ago
parent
commit
65b9dee7f7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Controller/VideothequeController.php

+ 1 - 1
src/Controller/VideothequeController.php

@@ -28,7 +28,7 @@ class VideothequeController extends AbstractController
 	public function listeAction(Request $request, FilmRepository $repo)
 	{
         $listeFilms = $repo->findTous();
-        if ($this->getUser()->getProfile()->getView() === 0) {
+        if ($this->isGranted('IS_AUTHENTICATED_FULLY') && $this->getUser()->getProfile()->getView() === 0) {
             $type = "tableaux";
         } else {
             $type = "vignettes";