chore: correct stale role_hierarchy comments
This commit is contained in:
@@ -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 = [];
|
$assignableManagers = [];
|
||||||
if ($this->isGranted('ROLE_GROUPS_ADMIN')) {
|
if ($this->isGranted('ROLE_GROUPS_ADMIN')) {
|
||||||
$assignableManagers = $this->userRepo->findGroupsStaff();
|
$assignableManagers = $this->userRepo->findGroupsStaff();
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ class FilterController extends AbstractController
|
|||||||
#[Route('/admin/accommodation-booking/filter', name: 'app_admin_accommodationbooking_filter', methods: ['GET'])]
|
#[Route('/admin/accommodation-booking/filter', name: 'app_admin_accommodationbooking_filter', methods: ['GET'])]
|
||||||
public function filter(Request $request): Response
|
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');
|
$seesAllBookings = $this->isGranted('ROLE_GROUPS_ADMIN');
|
||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ class IndexController extends AbstractController
|
|||||||
#[Route('/admin/accommodation-booking', name: 'app_admin_accommodationbooking')]
|
#[Route('/admin/accommodation-booking', name: 'app_admin_accommodationbooking')]
|
||||||
public function index(Request $request): Response
|
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');
|
$seesAllBookings = $this->isGranted('ROLE_GROUPS_ADMIN');
|
||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
$user = $user instanceof User ? $user : null;
|
$user = $user instanceof User ? $user : null;
|
||||||
|
|||||||
Reference in New Issue
Block a user