diff --git a/.changes/unreleased/Fixed-20251119-161233.yaml b/.changes/unreleased/Fixed-20251119-161233.yaml new file mode 100644 index 000000000..186f95d67 --- /dev/null +++ b/.changes/unreleased/Fixed-20251119-161233.yaml @@ -0,0 +1,7 @@ +kind: Fixed +body: | + Hide the display of inactive user groups in the api +time: 2025-11-19T16:12:33.803084517+01:00 +custom: + Issue: "471" + SchemaChange: No schema change diff --git a/src/Bundle/ChillMainBundle/Controller/UserGroupApiController.php b/src/Bundle/ChillMainBundle/Controller/UserGroupApiController.php index 602b84ec5..0395812b3 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserGroupApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserGroupApiController.php @@ -12,5 +12,12 @@ declare(strict_types=1); namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; +use Symfony\Component\HttpFoundation\Request; -class UserGroupApiController extends ApiController {} +class UserGroupApiController extends ApiController +{ + protected function customizeQuery(string $action, Request $request, $query): void + { + $query->andWhere('e.active = TRUE'); + } +}