getMissingPrivileges example



            if (!$source->isAllowed($resource . ':' . $privilege)) {
                $missingPrivileges[] = $resource . ':' . $privilege;
            }

            $event = new CommandAclValidationEvent($missingPrivileges$source$command);
            $this->eventDispatcher->dispatch($event);
            /** * @var list<string> $missingPrivileges */
            $missingPrivileges = $event->getMissingPrivileges();
        }

        $this->tryToThrow($missingPrivileges);
    }

    /** * @param list<string> $missingPrivileges */
    private function tryToThrow(array $missingPrivileges): void
    {
        if (!empty($missingPrivileges)) {
            
Home | Imprint | This part of the site doesn't use cookies.