chore: correct stale role_hierarchy comments

This commit is contained in:
Björn Fromme
2026-08-12 17:47:01 +02:00
parent 6af8044f7c
commit 490acc2e8b
3 changed files with 6 additions and 3 deletions
@@ -71,7 +71,8 @@ class EditController extends AbstractController
));
}
// ROLE_ADMIN inherits ROLE_GROUPS_ADMIN, so this single check covers both.
// ROLE_GROUPS_ADMIN is granted explicitly since 6c1073e4 removed it from ROLE_ADMIN's
// role_hierarchy — an administrator who needs this has to hold it in their own right.
$assignableManagers = [];
if ($this->isGranted('ROLE_GROUPS_ADMIN')) {
$assignableManagers = $this->userRepo->findGroupsStaff();
@@ -34,7 +34,8 @@ class FilterController extends AbstractController
#[Route('/admin/accommodation-booking/filter', name: 'app_admin_accommodationbooking_filter', methods: ['GET'])]
public function filter(Request $request): Response
{
// ROLE_ADMIN inherits ROLE_GROUPS_ADMIN, so this single check covers both.
// ROLE_GROUPS_ADMIN is granted explicitly since 6c1073e4 removed it from ROLE_ADMIN's
// role_hierarchy — an administrator who needs this has to hold it in their own right.
$seesAllBookings = $this->isGranted('ROLE_GROUPS_ADMIN');
$user = $this->getUser();
@@ -32,7 +32,8 @@ class IndexController extends AbstractController
#[Route('/admin/accommodation-booking', name: 'app_admin_accommodationbooking')]
public function index(Request $request): Response
{
// ROLE_ADMIN inherits ROLE_GROUPS_ADMIN, so this single check covers both.
// ROLE_GROUPS_ADMIN is granted explicitly since 6c1073e4 removed it from ROLE_ADMIN's
// role_hierarchy — an administrator who needs this has to hold it in their own right.
$seesAllBookings = $this->isGranted('ROLE_GROUPS_ADMIN');
$user = $this->getUser();
$user = $user instanceof User ? $user : null;