Article view is now security aware

ArticleController::viewAction is now aware of Article::public

Signed-off-by: Gergely Polonkai <polesz@w00d5t0ck.info>
master
Polonkai Gergely 11 years ago
parent 649fafe5c0
commit 121f6a110c

@ -20,6 +20,9 @@ class ArticleController extends Controller
*/
public function viewAction(Article $article)
{
if ((!is_object($this->_securityContext->getToken()) || !is_object($this->_securityContext->getToken()->getUser())) && !$article->isPublic())
throw new AccessDeniedException('A cikk megtekintéséhez be kell jelentkezned!');
return array(
'article' => $article,
);

Loading…
Cancel
Save