public function addWorkspacesAction($id, $class, Request $request)
    {
        $object = $this->find($class, $id);
        $workspaces = $this->decodeIdsString($request, 'Claroline\CoreBundle\Entity\Workspace\Workspace');
        $this->crud->patch($object, 'workspace', Crud::COLLECTION_ADD, $workspaces);

        return new JsonResponse(
            $this->serializer->serialize($object)
        );
    }