feat: groups price calculator admin crud, booking/offer flow and api

This commit is contained in:
Björn Fromme
2026-08-03 15:25:10 +02:00
parent eabed8295a
commit 9d2aa11fdb
258 changed files with 16231 additions and 582 deletions
@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace App\Security\Voter;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* @extends Voter<string, mixed>
*/
class AdministrativeAccessVoter extends Voter
{
public const ADMINISTRATIVE_ACCESS = 'ADMINISTRATIVE_ACCESS';
public function __construct(
private readonly AuthorizationCheckerInterface $authorizationChecker,
) {
}
protected function supports(string $attribute, mixed $subject): bool
{
return self::ADMINISTRATIVE_ACCESS === $attribute;
}
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
return $this->authorizationChecker->isGranted('ROLE_ADMIN')
|| $this->authorizationChecker->isGranted('ROLE_GROUPS_MANAGER');
}
}