feat: list administrative users for admins
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\System\User;
|
||||
|
||||
use App\Repository\UserRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly UserRepository $userRepository)
|
||||
{}
|
||||
|
||||
#[Route('/admin/system/user', name: 'app_admin_system_user_index')]
|
||||
#[IsGranted('ROLE_ADMIN')]
|
||||
public function index(): Response
|
||||
{
|
||||
$users = $this->userRepository->getAdministrativeUsers();
|
||||
|
||||
return $this->render('admin/system/user/index.html.twig', [
|
||||
'users' => $users,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user