final public function isGranted(array $roles, array $resources, array $modules, array $accesses)
    {
        // Find a user which matches the required roles.
        $user = $this->checkRole($roles);

        if (null === $user) {
            return false;
        } else {
            return $this->isUserGranted($roles, $resources, $modules, $accesses, $user);
        }
    }