The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Bug fix: _securityController was not defined in ArticleController

Signed-off-by: Gergely Polonkai <polesz@w00d5t0ck.info>
master
Polonkai Gergely 10 years ago
parent f782c28678
commit 099a6d3609
  1. 4
      src/KekRozsak/FrontBundle/Controller/ArticleController.php

@ -6,6 +6,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use KekRozsak\FrontBundle\Entity\Article;
@ -20,7 +21,8 @@ class ArticleController extends Controller
*/
public function viewAction(Article $article)
{
if ((!is_object($this->_securityContext->getToken()) || !is_object($this->_securityContext->getToken()->getUser())) && !$article->isPublic())
$scontext = $this->get('security.context');
if ((!is_object($scontext->getToken()) || !is_object($scontext->getToken()->getUser())) && !$article->isPublic())
throw new AccessDeniedException('A cikk megtekintéséhez be kell jelentkezned!');
return array(

Loading…
Cancel
Save