From e94884c1b5938169f32be9d87eca2408a94cd58e Mon Sep 17 00:00:00 2001 From: Luca Bellenghi Date: Fri, 1 Dec 2023 13:46:51 +0100 Subject: [PATCH] update list of non searchable types in io-Comune --- CHANGES.rst | 2 ++ .../plone/policy/profiles/default/metadata.xml | 2 +- src/design/plone/policy/setuphandlers.py | 12 +++++++++++- src/design/plone/policy/upgrades.zcml | 10 ++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 126b0c5..4edd839 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,8 @@ Changelog 5.0.7 (unreleased) ------------------ +- Update list of non searchable type in io-Comune + [lucabel] - Do not return section children in @search-filters endpoint if they are types omitted from search results. [cekk] diff --git a/src/design/plone/policy/profiles/default/metadata.xml b/src/design/plone/policy/profiles/default/metadata.xml index 72317ec..ea9443b 100644 --- a/src/design/plone/policy/profiles/default/metadata.xml +++ b/src/design/plone/policy/profiles/default/metadata.xml @@ -1,6 +1,6 @@ - 3102 + 3103 profile-plone.restapi:default profile-design.plone.contenttypes:default diff --git a/src/design/plone/policy/setuphandlers.py b/src/design/plone/policy/setuphandlers.py index 84103fa..281e46b 100644 --- a/src/design/plone/policy/setuphandlers.py +++ b/src/design/plone/policy/setuphandlers.py @@ -62,8 +62,12 @@ def post_install(context): create_secondary_menu() -def disable_searchable_types(): +def disable_searchable_types(context=None): # remove some types from search enabled ones + + # This is the list updated at 2023/12/01 with all types that + # could not be searchable in io-Comune + registry = getUtility(IRegistry) settings = registry.forInterface(ISearchSchema, prefix="plone") remove_types = [ @@ -74,8 +78,14 @@ def disable_searchable_types(): "Discussion Item", "Dataset", "Documento Personale", + "File", + "Image", + "Incarico", + "LRF", "Messaggio", + "Modulo", "Pratica", + "PuntoDiContatto", "RicevutaPagamento", ] types = set(settings.types_not_searched) diff --git a/src/design/plone/policy/upgrades.zcml b/src/design/plone/policy/upgrades.zcml index 797b55a..e10469d 100644 --- a/src/design/plone/policy/upgrades.zcml +++ b/src/design/plone/policy/upgrades.zcml @@ -201,4 +201,14 @@ handler=".upgrades.update_registry" /> + + +