Commit 6c993599 authored by notebook's avatar notebook
Browse files

Merge origin/master into skuska

Conflicts:
	composer.lock
	config/packages/security.yaml
	src/Controller/Admin/DashboardController.php
	symfony.lock
parent 8372f42a
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class AdminController extends AbstractController
{
/**
* @Route("/admin", name="admin")
*/
public function index(): Response
{
return $this->render('admin/index.html.twig', [
'controller_name' => 'AdminController',
]);
}
/**
* @Route("users", name="users")
*/
public function usersAction()
{
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
if (!$this->isGranted('ROLE_ADMIN')) {
return new Response('Nemáte právo meniť užívateľa.');
}
$users = $this->getDoctrine()
->getRepository("App:User")
->findAll();
return $this->render('admin/users.html.twig', array(
'users' => $users
));
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment