diff --git a/config/routes/admin/user.yaml b/config/routes/admin/user.yaml index 30f565f9..9832678a 100644 --- a/config/routes/admin/user.yaml +++ b/config/routes/admin/user.yaml @@ -7,3 +7,10 @@ timeline: path: /{id}/timeline controller: App\Controller\Web\Admin\UserAdminController::timeline methods: ['GET'] + +account_privacy: + path: /{id}/account-privacy + controller: App\Controller\Web\Admin\UserAdminController::accountPrivacy + methods: ['GET'] + + diff --git a/src/Controller/Web/Admin/UserAdminController.php b/src/Controller/Web/Admin/UserAdminController.php index 788c3fc8..6f5d7ab1 100644 --- a/src/Controller/Web/Admin/UserAdminController.php +++ b/src/Controller/Web/Admin/UserAdminController.php @@ -17,6 +17,9 @@ public function __construct( ) { } + /** + * Lista todos os usuários + */ public function list(): Response { $users = $this->service->findAll(); @@ -35,4 +38,17 @@ public function timeline(Uuid $id): Response 'events' => $events, ]); } + + public function accountPrivacy(Uuid $id): Response + { + $user = $this->service->get($id); + + if (!$user) { + return $this->redirectToRoute('login'); + } + + return $this->render('user/account-privacy.html.twig', [ + 'user' => $user, + ]); + } } diff --git a/src/EventSubscriber/ApiCustomResponseSubscriber.php b/src/EventSubscriber/ApiCustomResponseSubscriber.php index 1e980043..e8402a80 100644 --- a/src/EventSubscriber/ApiCustomResponseSubscriber.php +++ b/src/EventSubscriber/ApiCustomResponseSubscriber.php @@ -37,6 +37,8 @@ public function generateCustomError(ExceptionEvent $event): void { $exception = $event->getThrowable(); + dd($exception); + if ($exception instanceof NotFoundHttpException || $exception instanceof ResourceNotFoundException) { $this->generateNotFoundError($event); diff --git a/templates/_admin/user/account-privacy.html.twig b/templates/_admin/user/account-privacy.html.twig new file mode 100644 index 00000000..9c74f5f8 --- /dev/null +++ b/templates/_admin/user/account-privacy.html.twig @@ -0,0 +1,17 @@ +{% extends "_layouts/base.html.twig" %} + +{% block content %} +

{{ 'account_privacy'|trans }}

+

{{ user.name }}

+{% endblock %} + + +{#{% extends "_layouts/blank.html.twig" %}#} + +{#{% block title %} conta e privacidade {% endblock %}#} + +{#{% block content %}#} + + +{#{% endblock %}#} + diff --git a/templates/_components/navbar.html.twig b/templates/_components/navbar.html.twig index 92f5f4ea..06dc3219 100644 --- a/templates/_components/navbar.html.twig +++ b/templates/_components/navbar.html.twig @@ -30,57 +30,57 @@ {% if (env.aurora.modules.opportunities != '' ) %} - + {% endif %} {% if (env.aurora.modules.agents != '' ) %} - + {% endif %} {% if (env.aurora.modules.organizations != '' ) %} - + {% endif %} {% if (env.aurora.modules.events != '' ) %} - + {% endif %} {% if (env.aurora.modules.spaces != '' ) %} - + {% endif %} {% if (env.aurora.modules.initiatives != '' ) %} - + {% endif %} @@ -123,7 +123,7 @@