From 2ae793b76391b13fa18e826e9389c6c8a838978f Mon Sep 17 00:00:00 2001 From: Jonathan Foucher <jfoucher@gmail.com> Date: Tue, 13 Feb 2024 16:28:23 +0100 Subject: [PATCH] Make delete all confirmation work for non admins. Fixes https://gitlab.adullact.net/soluris/madis/-/issues/883 --- src/Application/Controller/CRUDController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Application/Controller/CRUDController.php b/src/Application/Controller/CRUDController.php index cf0bc3b0d..78bf77c84 100644 --- a/src/Application/Controller/CRUDController.php +++ b/src/Application/Controller/CRUDController.php @@ -434,11 +434,11 @@ abstract class CRUDController extends AbstractController $ids = $request->query->get('ids'); $ids = explode(',', $ids); - if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) { - $this->addFlash('success', $this->getFlashbagMessage('success', 'delete')); - - return $this->redirectToRoute($this->getRouteName('list')); - } + // if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) { + // $this->addFlash('success', $this->getFlashbagMessage('success', 'delete-all')); + // + // return $this->redirectToRoute($this->getRouteName('list')); + // } return $this->render($this->getTemplatingBasePath('delete_all'), [ // delete_all 'ids' => $ids, -- GitLab