From 06a805aea7050b6891d264911b87dd511c98c7e7 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Tue, 6 May 2025 11:39:47 +0200 Subject: [PATCH 1/9] Initial commit --- src/redturtle/volto/configure.zcml | 1 + src/redturtle/volto/profiles/default/metadata.xml | 2 +- .../volto/profiles/default/registry/criteria.xml | 4 ++++ src/redturtle/volto/upgrades.py | 11 +++++++++++ src/redturtle/volto/upgrades.zcml | 9 +++++++++ src/redturtle/volto/vocabularies/__init__.py | 0 src/redturtle/volto/vocabularies/configure.zcml | 15 +++++++++++++++ src/redturtle/volto/vocabularies/principals.py | 11 +++++++++++ 8 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/redturtle/volto/vocabularies/__init__.py create mode 100644 src/redturtle/volto/vocabularies/configure.zcml create mode 100644 src/redturtle/volto/vocabularies/principals.py diff --git a/src/redturtle/volto/configure.zcml b/src/redturtle/volto/configure.zcml index 00c6d078..468a1f02 100644 --- a/src/redturtle/volto/configure.zcml +++ b/src/redturtle/volto/configure.zcml @@ -13,6 +13,7 @@ + diff --git a/src/redturtle/volto/profiles/default/metadata.xml b/src/redturtle/volto/profiles/default/metadata.xml index 0753e7fd..f144c7a5 100644 --- a/src/redturtle/volto/profiles/default/metadata.xml +++ b/src/redturtle/volto/profiles/default/metadata.xml @@ -1,6 +1,6 @@ - 4500 + 4501 profile-plone.volto:default profile-plone.app.caching:with-caching-proxy diff --git a/src/redturtle/volto/profiles/default/registry/criteria.xml b/src/redturtle/volto/profiles/default/registry/criteria.xml index 327be94e..2b22fce1 100644 --- a/src/redturtle/volto/profiles/default/registry/criteria.xml +++ b/src/redturtle/volto/profiles/default/registry/criteria.xml @@ -17,4 +17,8 @@ Metadata + + redturtle.volto.vocabularies.Creators + + diff --git a/src/redturtle/volto/upgrades.py b/src/redturtle/volto/upgrades.py index faa47a57..239a3644 100644 --- a/src/redturtle/volto/upgrades.py +++ b/src/redturtle/volto/upgrades.py @@ -12,6 +12,9 @@ from redturtle.volto.setuphandlers import remove_custom_googlebot from uuid import uuid4 from zope.schema import getFields +from zope.component import getUtility +from plone.registry.interfaces import IRegistry +from plone.app.querystring.interfaces import IQueryField try: @@ -629,3 +632,11 @@ def to_4500(context): behaviors.append("kitconcept.seo") # adjust behaviors portal_types["Plone Site"].behaviors = tuple(behaviors) + + +def to_4501(context): + registry = getUtility(IRegistry) + settings = registry.forInterface( + IQueryField, prefix="plone.app.querystring.field.Creator" + ) + settings.vocabulary = "redturtle.volto.vocabularies.Creators" diff --git a/src/redturtle/volto/upgrades.zcml b/src/redturtle/volto/upgrades.zcml index eaf0325e..602f7db7 100644 --- a/src/redturtle/volto/upgrades.zcml +++ b/src/redturtle/volto/upgrades.zcml @@ -271,5 +271,14 @@ source="4400" destination="4500" handler=".upgrades.to_4500" + /> + + diff --git a/src/redturtle/volto/vocabularies/__init__.py b/src/redturtle/volto/vocabularies/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/redturtle/volto/vocabularies/configure.zcml b/src/redturtle/volto/vocabularies/configure.zcml new file mode 100644 index 00000000..c1fa638f --- /dev/null +++ b/src/redturtle/volto/vocabularies/configure.zcml @@ -0,0 +1,15 @@ + + + + + + diff --git a/src/redturtle/volto/vocabularies/principals.py b/src/redturtle/volto/vocabularies/principals.py new file mode 100644 index 00000000..41c7f4d9 --- /dev/null +++ b/src/redturtle/volto/vocabularies/principals.py @@ -0,0 +1,11 @@ +from zope.interface import implementer +from zope.schema.interfaces import IVocabularyFactory +from plone.app.vocabularies.catalog import KeywordsVocabulary + + +@implementer(IVocabularyFactory) +class CreatorsVocabulary(KeywordsVocabulary): + keyword_index = "Creator" + + +CreatorsVocabularyFactory = CreatorsVocabulary() From 309c69d9c1b68adb2778c5a06997f53f8fb257ab Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Tue, 6 May 2025 11:57:10 +0200 Subject: [PATCH 2/9] Formatting --- src/redturtle/volto/upgrades.py | 6 +++--- src/redturtle/volto/vocabularies/configure.zcml | 1 - src/redturtle/volto/vocabularies/principals.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/redturtle/volto/upgrades.py b/src/redturtle/volto/upgrades.py index 239a3644..dc5f261c 100644 --- a/src/redturtle/volto/upgrades.py +++ b/src/redturtle/volto/upgrades.py @@ -6,15 +6,15 @@ from plone.app.linkintegrity.handlers import getObjectsFromLinks from plone.app.linkintegrity.handlers import updateReferences from plone.app.linkintegrity.interfaces import IRetriever +from plone.app.querystring.interfaces import IQueryField from plone.app.upgrade.utils import installOrReinstallProduct from plone.dexterity.utils import iterSchemata +from plone.registry.interfaces import IRegistry from plone.restapi.behaviors import IBlocks from redturtle.volto.setuphandlers import remove_custom_googlebot from uuid import uuid4 -from zope.schema import getFields from zope.component import getUtility -from plone.registry.interfaces import IRegistry -from plone.app.querystring.interfaces import IQueryField +from zope.schema import getFields try: diff --git a/src/redturtle/volto/vocabularies/configure.zcml b/src/redturtle/volto/vocabularies/configure.zcml index c1fa638f..99b4d662 100644 --- a/src/redturtle/volto/vocabularies/configure.zcml +++ b/src/redturtle/volto/vocabularies/configure.zcml @@ -12,4 +12,3 @@ /> - diff --git a/src/redturtle/volto/vocabularies/principals.py b/src/redturtle/volto/vocabularies/principals.py index 41c7f4d9..91f0ad79 100644 --- a/src/redturtle/volto/vocabularies/principals.py +++ b/src/redturtle/volto/vocabularies/principals.py @@ -1,6 +1,6 @@ +from plone.app.vocabularies.catalog import KeywordsVocabulary from zope.interface import implementer from zope.schema.interfaces import IVocabularyFactory -from plone.app.vocabularies.catalog import KeywordsVocabulary @implementer(IVocabularyFactory) From 3162e7930fc126d12260b384bea1d02608c59a04 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Tue, 6 May 2025 13:53:30 +0200 Subject: [PATCH 3/9] Changelog --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index bc1f8947..5615464e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -28,6 +28,9 @@ Changelog [cekk] - Enable kitconcept.seo behavior on Site Root. [cekk] +- Use custom creator criteria. + [folix-01] + 5.8.0 (2025-03-20) ------------------ From 19279fa97900f1a76b2db7c6ad8ff8cb000c6ff9 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Tue, 6 May 2025 14:58:15 +0200 Subject: [PATCH 4/9] Update CHANGES.rst --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5615464e..38ca61e9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -29,6 +29,7 @@ Changelog - Enable kitconcept.seo behavior on Site Root. [cekk] - Use custom creator criteria. +- Use custom creator criteria to list only creators present in the catalog. [folix-01] From 9bf68d10067fcb97cde39e7d57e450ddb7bed6b4 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 7 May 2025 12:20:37 +0200 Subject: [PATCH 5/9] Update CHANGES.rst --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 38ca61e9..029f16f1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -30,6 +30,8 @@ Changelog [cekk] - Use custom creator criteria. - Use custom creator criteria to list only creators present in the catalog. +- Use custom creator criteria to list only creators present in the catalog + avoiding the plone.many_users setting to send the empty users list. [folix-01] From 5f7c9475898d3ff27236429f76ccaae69aeb034a Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Wed, 7 May 2025 15:30:18 +0200 Subject: [PATCH 6/9] Update CHANGES.rst Co-authored-by: Andrea Cecchi --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 029f16f1..bbc385a7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -31,7 +31,7 @@ Changelog - Use custom creator criteria. - Use custom creator criteria to list only creators present in the catalog. - Use custom creator criteria to list only creators present in the catalog - avoiding the plone.many_users setting to send the empty users list. + to avoid an empty list when using LDAP and many_users flag [folix-01] From 3b4aaa3282f02e84bfe58503d3711fa1c72c2128 Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Tue, 10 Jun 2025 16:03:57 +0200 Subject: [PATCH 7/9] Fix pyroma --- CHANGES.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index bbc385a7..bfa02d66 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -30,8 +30,7 @@ Changelog [cekk] - Use custom creator criteria. - Use custom creator criteria to list only creators present in the catalog. -- Use custom creator criteria to list only creators present in the catalog - to avoid an empty list when using LDAP and many_users flag +- Use custom creator criteria to list only creators present in the catalog to avoid an empty list when using LDAP and many_users flag [folix-01] From 9e959b43cb950af0365d991fa77b0a0975a3ee12 Mon Sep 17 00:00:00 2001 From: Mauro Amico Date: Wed, 7 Jan 2026 17:45:16 +0100 Subject: [PATCH 8/9] Clean up custom creator criteria entries in CHANGES.rst Removed redundant entries regarding custom creator criteria from the changelog. --- CHANGES.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index e2e5d6fb..7d4d7a88 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,8 @@ Changelog - Fix bug search event restapi (#148) [mamico] - +- Use custom creator criteria to list only creators present in the catalog to avoid an empty list when using LDAP and many_users flag + [folix-01] 5.9.3 (2025-11-24) ------------------ @@ -51,11 +52,6 @@ Changelog [cekk] - Enable kitconcept.seo behavior on Site Root. [cekk] -- Use custom creator criteria. -- Use custom creator criteria to list only creators present in the catalog. -- Use custom creator criteria to list only creators present in the catalog to avoid an empty list when using LDAP and many_users flag - [folix-01] - 5.8.0 (2025-03-20) ------------------ From 3e3e000636f2062dfaafa872faa3f4e073a1e9f6 Mon Sep 17 00:00:00 2001 From: Mauro Amico Date: Wed, 7 Jan 2026 17:54:02 +0100 Subject: [PATCH 9/9] Fix XML formatting in upgrades.zcml --- src/redturtle/volto/upgrades.zcml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/redturtle/volto/upgrades.zcml b/src/redturtle/volto/upgrades.zcml index 765fc7fc..7a49d366 100644 --- a/src/redturtle/volto/upgrades.zcml +++ b/src/redturtle/volto/upgrades.zcml @@ -271,8 +271,7 @@ source="4400" destination="4500" handler=".upgrades.to_4500" - /> - + />