Skip to content

BUG : Missing use statement #108

@CPASimUSante

Description

@CPASimUSante

I have this error :

Attempted to load class "AccessDeniedException" from namespace "UJM\ExoBundle\Controller".
Did you forget a "use" statement for e.g. "Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException", "Symfony\Component\Finder\Exception\AccessDeniedException" or "Symfony\Component\Security\Core\Exception\AccessDeniedException"?
500 Internal Server Error - ClassNotFoundException

Stack Trace
in vendor/ujm/exo-bundle/UJM/ExoBundle/Controller/PaperController.php at line 414   -
        $collection = new ResourceCollection(array($exo->getResourceNode()));
        if (!$this->get('security.authorization_checker')->isGranted('OPEN', $collection)) {
            throw new AccessDeniedException($collection->getErrorsForDisplay());
        }
    }

I think it should be :

throw new \Symfony\Component\Security\Core\Exception\AccessDeniedException($collection->getErrorsForDisplay());

or add
use \Symfony\Component\Security\Core\Exception\AccessDeniedException;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions