public function hasAccess($accessEntityUuid, $accessLevel)
    {
        // Do not check the database if we haven't all data
        if ($accessEntityUuid == '' || $accessLevel == '') {
            return false;
        }
        
        try {
            $queryBuilder = $this->entityManager->getQueryBuilder();
            $queryBuilder->select($queryBuilder->expr()->count('p.id'))
                         ->from('\\Zepi\\Core\\AccessControl\\Entity\\Permission', 'p')
                         ->where('p.accessEntityUuid = :accessEntityUuid')
                         ->andWhere('p.accessLevelKey = :accessLevel')
                         ->setParameter('accessEntityUuid', $accessEntityUuid)
                         ->setParameter('accessLevel', $accessLevel);
            
            $data = $queryBuilder->getQuery();
            if ($data === false) {
                return false;
            }
            
            return ($data->getSingleScalarResult() > 0);
        } catch (\Exception $e) {
            throw new Exception('Cannot verify the permission for uuid "' . $accessEntityUuid . '" and access level "' . $accessLevel . '".', 0, $e);
        }
    }