public function indexAction(Request $request)
{
$em = $this->get('em');
$user = $this->container->get('user')->getCurrentUser();
$translator = $this->container->get('translator');
if (!$user->hasPermission('ManagePub')) {
throw new AccessDeniedException($translator->trans("You do not have the right to change publication information.", array(), 'pub'));
}
$publications = $em->getRepository('Newscoop\\Entity\\Publication')->getPublications()->getArrayResult();
return $this->render('NewscoopNewscoopBundle:BackendPublications:index.html.twig', array('publications' => $publications));
}