Article view is now security aware
ArticleController::viewAction is now aware of Article::public Signed-off-by: Gergely Polonkai <polesz@w00d5t0ck.info>
This commit is contained in:
@@ -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,
|
||||
);
|
||||
|
Reference in New Issue
Block a user