public function hasPermissionForId($id)
    {
        try {
            $em = $this->entityManager->getDoctrineEntityManager();
            $permission = $em->getRepository('\\Zepi\\Core\\AccessControl\\Entity\\Permission')->find($id);
            
            if ($permission !== null) {
                return true;
            }
            
            return false;
        } catch (\Exception $e) {
            throw new Exception('Cannot check if there is a permission for the given id "' . $id . '".', 0, $e);
        }
    }