public function findAccessesByRoles(array $roles)
    {
        $dql = '
            SELECT pp.property as property, MAX(pp.isEditable) as isEditable
            FROM Claroline\CoreBundle\Entity\ProfileProperty pp
            JOIN pp.role role
            WHERE role.name in (:roleNames)
            GROUP BY pp.property
        ';

        $query = $this->_em->createQuery($dql);
        $query->setParameter('roleNames', $roles);

        $results = $query->getResult();
        $properties = array();

        foreach ($results as $result) {
            $properties[$result['property']] = (boolean) $result['isEditable'];
        }

        return $properties;
    }