security->getUser(); return $user instanceof Employee ? $user : null; } public function isPlatformAdmin(): bool { return $this->security->isGranted(Employee::ROLE_PLATFORM_ADMIN); } public function getReseller(): ?Reseller { return $this->getEmployee()?->getCompany()->getReseller(); } public function getCompany(): ?Company { // Reseller-/Plattform-Admins sind reseller-weit unterwegs → keine Company-Einschränkung if ($this->security->isGranted(Employee::ROLE_RESELLER_ADMIN)) { return null; } return $this->getEmployee()?->getCompany(); } }