plone.app.querystring 2.1.5__tar.gz → 3.0.0a2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/CHANGES.rst +15 -5
- {plone_app_querystring-2.1.5/src/plone.app.querystring.egg-info → plone_app_querystring-3.0.0a2}/PKG-INFO +19 -14
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/pyproject.toml +1 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/setup.py +4 -13
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/queryparser.py +3 -6
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/registryreader.py +18 -10
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/testQueryBuilder.py +14 -14
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/testQueryParser.py +8 -1
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/testRegistryReader.py +19 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2/src/plone.app.querystring.egg-info}/PKG-INFO +19 -14
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone.app.querystring.egg-info/SOURCES.txt +0 -3
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone.app.querystring.egg-info/requires.txt +1 -2
- plone_app_querystring-2.1.5/src/plone/__init__.py +0 -1
- plone_app_querystring-2.1.5/src/plone/app/__init__.py +0 -1
- plone_app_querystring-2.1.5/src/plone.app.querystring.egg-info/namespace_packages.txt +0 -2
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/CONTRIBUTING.rst +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/MANIFEST.in +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/README.rst +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/docs/LICENSE.GPL +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/docs/LICENSE.txt +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/setup.cfg +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/__init__.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/configure.zcml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/hiddenprofiles.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/indexmodifiers/__init__.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/indexmodifiers/configure.zcml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/indexmodifiers/query_index_modifiers.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/interfaces.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/default/metadata.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/default/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_10/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_11/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_14/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_3/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_5/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_6/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_7/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_8/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles/upgrades/to_9/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/profiles.zcml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/querybuilder.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/querymodifiers.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/results.pt +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/testing.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/__init__.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/configure.zcml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/index_testmodifier.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/profiles/registry/metadata.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/profiles/registry/registry.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/registry_minimal_correct.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/registry_test_missing_operator.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/registry_test_vocabulary.xml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/registry_testdata.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/testIndexmodifiers.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/testQueryBuilderModifiers.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/testRegistryIntegration.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/tests/testVocabularies.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/upgrades.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/upgrades.zcml +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/vocabularies.py +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone.app.querystring.egg-info/dependency_links.txt +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone.app.querystring.egg-info/entry_points.txt +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone.app.querystring.egg-info/not-zip-safe +0 -0
- {plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone.app.querystring.egg-info/top_level.txt +0 -0
|
@@ -8,14 +8,14 @@ Changelog
|
|
|
8
8
|
|
|
9
9
|
.. towncrier release notes start
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
3.0.0a2 (2025-11-26)
|
|
12
|
+
--------------------
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Bug fixes:
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
|
|
17
|
+
- Don't ignore sort_on values which are not ZCatalog indexes. @davisagli (#173)
|
|
18
|
+
- Don't include vocabulary values in QuerystringRegistryReader results if the current user doesn't have permission for the vocabulary. @davisagli
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
Tests:
|
|
@@ -24,6 +24,16 @@ Tests:
|
|
|
24
24
|
- Fix tests for ``not`` queries in ``Products.ZCatalog`` 7.2.0+. [maurits]
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
3.0.0a1 (2025-11-19)
|
|
28
|
+
--------------------
|
|
29
|
+
|
|
30
|
+
Breaking changes:
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
- Replace ``pkg_resources`` namespace with PEP 420 native namespace.
|
|
34
|
+
Support only Plone 6.2 and Python 3.10+. (#3928)
|
|
35
|
+
|
|
36
|
+
|
|
27
37
|
2.1.4 (2025-09-11)
|
|
28
38
|
------------------
|
|
29
39
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plone.app.querystring
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0a2
|
|
4
4
|
Summary: A queryparser, querybuilder and extra helper tools, to parse stored queries to actual results, used in new style Plone collections
|
|
5
5
|
Home-page: https://github.com/plone/plone.app.querystring
|
|
6
6
|
Author: Plone Foundation
|
|
@@ -9,18 +9,13 @@ License: GPL version 2
|
|
|
9
9
|
Keywords: collection queries
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Framework :: Plone
|
|
12
|
-
Classifier: Framework :: Plone :: 6.
|
|
13
|
-
Classifier: Framework :: Plone :: 6.1
|
|
12
|
+
Classifier: Framework :: Plone :: 6.2
|
|
14
13
|
Classifier: Framework :: Plone :: Core
|
|
15
14
|
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
|
16
15
|
Classifier: Programming Language :: Python
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
-
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
-
Requires-Python: >=3.9
|
|
23
|
-
Requires-Dist: setuptools
|
|
18
|
+
Requires-Python: >=3.10
|
|
24
19
|
Requires-Dist: plone.app.contentlisting
|
|
25
20
|
Requires-Dist: plone.app.registry>=1.1
|
|
26
21
|
Requires-Dist: plone.app.vocabularies
|
|
@@ -30,12 +25,12 @@ Requires-Dist: plone.i18n
|
|
|
30
25
|
Requires-Dist: plone.registry
|
|
31
26
|
Requires-Dist: plone.uuid
|
|
32
27
|
Requires-Dist: Products.GenericSetup
|
|
33
|
-
Requires-Dist: Products.ZCatalog
|
|
34
28
|
Requires-Dist: python-dateutil
|
|
35
29
|
Requires-Dist: Zope
|
|
36
30
|
Requires-Dist: zope.dottedname
|
|
37
31
|
Requires-Dist: zope.globalrequest
|
|
38
32
|
Provides-Extra: test
|
|
33
|
+
Requires-Dist: plone.app.content; extra == "test"
|
|
39
34
|
Requires-Dist: plone.app.testing; extra == "test"
|
|
40
35
|
Requires-Dist: plone.app.contenttypes[test]; extra == "test"
|
|
41
36
|
Dynamic: author
|
|
@@ -93,14 +88,14 @@ Changelog
|
|
|
93
88
|
|
|
94
89
|
.. towncrier release notes start
|
|
95
90
|
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
3.0.0a2 (2025-11-26)
|
|
92
|
+
--------------------
|
|
98
93
|
|
|
99
|
-
|
|
94
|
+
Bug fixes:
|
|
100
95
|
|
|
101
96
|
|
|
102
|
-
-
|
|
103
|
-
|
|
97
|
+
- Don't ignore sort_on values which are not ZCatalog indexes. @davisagli (#173)
|
|
98
|
+
- Don't include vocabulary values in QuerystringRegistryReader results if the current user doesn't have permission for the vocabulary. @davisagli
|
|
104
99
|
|
|
105
100
|
|
|
106
101
|
Tests:
|
|
@@ -109,6 +104,16 @@ Tests:
|
|
|
109
104
|
- Fix tests for ``not`` queries in ``Products.ZCatalog`` 7.2.0+. [maurits]
|
|
110
105
|
|
|
111
106
|
|
|
107
|
+
3.0.0a1 (2025-11-19)
|
|
108
|
+
--------------------
|
|
109
|
+
|
|
110
|
+
Breaking changes:
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
- Replace ``pkg_resources`` namespace with PEP 420 native namespace.
|
|
114
|
+
Support only Plone 6.2 and Python 3.10+. (#3928)
|
|
115
|
+
|
|
116
|
+
|
|
112
117
|
2.1.4 (2025-09-11)
|
|
113
118
|
------------------
|
|
114
119
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
from setuptools import find_packages
|
|
2
1
|
from setuptools import setup
|
|
3
2
|
|
|
4
3
|
|
|
5
|
-
version = "
|
|
4
|
+
version = "3.0.0a2"
|
|
6
5
|
|
|
7
6
|
long_description = open("README.rst").read() + "\n"
|
|
8
7
|
long_description += open("CHANGES.rst").read()
|
|
@@ -19,30 +18,22 @@ setup(
|
|
|
19
18
|
classifiers=[
|
|
20
19
|
"Development Status :: 5 - Production/Stable",
|
|
21
20
|
"Framework :: Plone",
|
|
22
|
-
"Framework :: Plone :: 6.
|
|
23
|
-
"Framework :: Plone :: 6.1",
|
|
21
|
+
"Framework :: Plone :: 6.2",
|
|
24
22
|
"Framework :: Plone :: Core",
|
|
25
23
|
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
|
26
24
|
"Programming Language :: Python",
|
|
27
|
-
"Programming Language :: Python :: 3.9",
|
|
28
25
|
"Programming Language :: Python :: 3.10",
|
|
29
26
|
"Programming Language :: Python :: 3.11",
|
|
30
|
-
"Programming Language :: Python :: 3.12",
|
|
31
|
-
"Programming Language :: Python :: 3.13",
|
|
32
27
|
],
|
|
33
28
|
keywords="collection queries",
|
|
34
29
|
author="Plone Foundation",
|
|
35
30
|
author_email="plone-developers@lists.sourceforge.net",
|
|
36
31
|
url="https://github.com/plone/plone.app.querystring",
|
|
37
32
|
license="GPL version 2",
|
|
38
|
-
packages=find_packages("src"),
|
|
39
|
-
package_dir={"": "src"},
|
|
40
|
-
namespace_packages=["plone", "plone.app"],
|
|
41
33
|
include_package_data=True,
|
|
42
34
|
zip_safe=False,
|
|
43
|
-
python_requires=">=3.
|
|
35
|
+
python_requires=">=3.10",
|
|
44
36
|
install_requires=[
|
|
45
|
-
"setuptools",
|
|
46
37
|
"plone.app.contentlisting",
|
|
47
38
|
"plone.app.registry>=1.1",
|
|
48
39
|
"plone.app.vocabularies",
|
|
@@ -52,7 +43,6 @@ setup(
|
|
|
52
43
|
"plone.registry",
|
|
53
44
|
"plone.uuid",
|
|
54
45
|
"Products.GenericSetup",
|
|
55
|
-
"Products.ZCatalog",
|
|
56
46
|
"python-dateutil",
|
|
57
47
|
"Zope",
|
|
58
48
|
"zope.dottedname",
|
|
@@ -60,6 +50,7 @@ setup(
|
|
|
60
50
|
],
|
|
61
51
|
extras_require={
|
|
62
52
|
"test": [
|
|
53
|
+
"plone.app.content",
|
|
63
54
|
"plone.app.testing",
|
|
64
55
|
"plone.app.contenttypes[test]",
|
|
65
56
|
]
|
|
@@ -78,12 +78,9 @@ def parseFormquery(context, formquery, sort_on=None, sort_order=None):
|
|
|
78
78
|
|
|
79
79
|
# Add sorting (sort_on and sort_order) to the query
|
|
80
80
|
if sort_on:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
query["sort_on"] = sort_on
|
|
85
|
-
if sort_order:
|
|
86
|
-
query["sort_order"] = sort_order
|
|
81
|
+
query["sort_on"] = sort_on
|
|
82
|
+
if sort_order:
|
|
83
|
+
query["sort_order"] = sort_order
|
|
87
84
|
return query
|
|
88
85
|
|
|
89
86
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
from AccessControl import getSecurityManager
|
|
2
|
+
from Acquisition import aq_parent
|
|
1
3
|
from collections import OrderedDict
|
|
2
4
|
from plone.app.querystring.interfaces import IQuerystringRegistryReader
|
|
3
5
|
from plone.base.utils import safe_text
|
|
4
6
|
from plone.i18n.normalizer.interfaces import IIDNormalizer
|
|
5
|
-
from Products.CMFCore.utils import getToolByName
|
|
6
|
-
from Products.ZCTextIndex.interfaces import IZCTextIndex
|
|
7
7
|
from zope.component import getUtility
|
|
8
8
|
from zope.component import queryUtility
|
|
9
|
-
from zope.component.hooks import getSite
|
|
10
9
|
from zope.globalrequest import getRequest
|
|
11
10
|
from zope.i18n import translate
|
|
12
11
|
from zope.i18nmessageid import Message
|
|
@@ -16,6 +15,13 @@ from zope.schema.interfaces import IVocabularyFactory
|
|
|
16
15
|
import logging
|
|
17
16
|
|
|
18
17
|
|
|
18
|
+
try:
|
|
19
|
+
from plone.app.content.browser.vocabulary import DEFAULT_PERMISSION
|
|
20
|
+
from plone.app.content.browser.vocabulary import PERMISSIONS
|
|
21
|
+
except ImportError:
|
|
22
|
+
PERMISSIONS = {}
|
|
23
|
+
DEFAULT_PERMISSION = "View"
|
|
24
|
+
|
|
19
25
|
logger = logging.getLogger("plone.app.querystring")
|
|
20
26
|
|
|
21
27
|
|
|
@@ -42,7 +48,7 @@ class QuerystringRegistryReader:
|
|
|
42
48
|
request = getRequest()
|
|
43
49
|
|
|
44
50
|
self.context = context
|
|
45
|
-
self.vocab_context = context
|
|
51
|
+
self.vocab_context = aq_parent(context)
|
|
46
52
|
self.request = request
|
|
47
53
|
|
|
48
54
|
def parseRegistry(self):
|
|
@@ -71,6 +77,10 @@ class QuerystringRegistryReader:
|
|
|
71
77
|
|
|
72
78
|
return result
|
|
73
79
|
|
|
80
|
+
def _checkVocabularyPermission(self, vocab_name):
|
|
81
|
+
permission = PERMISSIONS.get(vocab_name, DEFAULT_PERMISSION)
|
|
82
|
+
return getSecurityManager().checkPermission(permission, self.vocab_context)
|
|
83
|
+
|
|
74
84
|
def getVocabularyValues(self, values):
|
|
75
85
|
"""Get all vocabulary values if a vocabulary is defined"""
|
|
76
86
|
id_normalize = getUtility(IIDNormalizer).normalize
|
|
@@ -88,6 +98,9 @@ class QuerystringRegistryReader:
|
|
|
88
98
|
# Bail out if the annotation is marked not to fetch the vocabulary
|
|
89
99
|
# to allow the widget to query the vocabulary as needed
|
|
90
100
|
continue
|
|
101
|
+
if not self._checkVocabularyPermission(vocabulary):
|
|
102
|
+
# Don't include vocab values if user doesn't have permission
|
|
103
|
+
continue
|
|
91
104
|
for item in utility(self.vocab_context):
|
|
92
105
|
if isinstance(item.title, Message):
|
|
93
106
|
title = translate(item.title, context=self.request)
|
|
@@ -117,14 +130,9 @@ class QuerystringRegistryReader:
|
|
|
117
130
|
|
|
118
131
|
def mapSortableIndexes(self, values):
|
|
119
132
|
"""Map sortable indexes"""
|
|
120
|
-
catalog = getToolByName(getSite(), "portal_catalog")._catalog
|
|
121
133
|
sortables = {}
|
|
122
134
|
for key, field in values.get("%s.field" % self.prefix).items():
|
|
123
|
-
if
|
|
124
|
-
field["sortable"]
|
|
125
|
-
and key in catalog.indexes
|
|
126
|
-
and not IZCTextIndex.providedBy(catalog.getIndex(key))
|
|
127
|
-
):
|
|
135
|
+
if field["sortable"]:
|
|
128
136
|
sortables[key] = values.get(f"{self.prefix}.field.{key}")
|
|
129
137
|
values["sortable"] = sortables
|
|
130
138
|
return values
|
|
@@ -123,13 +123,11 @@ class TestQuerybuilder(unittest.TestCase):
|
|
|
123
123
|
}
|
|
124
124
|
]
|
|
125
125
|
results = self.querybuilder._makequery(query=query)
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
self.assertNotIn(
|
|
132
|
-
self.testpage.absolute_url(), [brain.getURL() for brain in results]
|
|
126
|
+
# We used to expect 1 result. But in fact the Plone Site should also
|
|
127
|
+
# be in the results. This happens since Products.ZCatalog 7.2.0.
|
|
128
|
+
self.assertEqual(
|
|
129
|
+
sorted([brain.getURL() for brain in results]),
|
|
130
|
+
["http://nohost/plone", "http://nohost/plone/testfolder"],
|
|
133
131
|
)
|
|
134
132
|
|
|
135
133
|
def testMakeQueryWithMultipleSubject(self):
|
|
@@ -159,13 +157,11 @@ class TestQuerybuilder(unittest.TestCase):
|
|
|
159
157
|
}
|
|
160
158
|
]
|
|
161
159
|
results = self.querybuilder._makequery(query=query)
|
|
162
|
-
#
|
|
163
|
-
#
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
self.assertNotIn(
|
|
168
|
-
self.testpage.absolute_url(), [brain.getURL() for brain in results]
|
|
160
|
+
# We used to expect 1 result. But in fact the Plone Site should also
|
|
161
|
+
# be in the results. This happens since Products.ZCatalog 7.2.0.
|
|
162
|
+
self.assertEqual(
|
|
163
|
+
sorted([brain.getURL() for brain in results]),
|
|
164
|
+
["http://nohost/plone", "http://nohost/plone/testfolder"],
|
|
169
165
|
)
|
|
170
166
|
|
|
171
167
|
def testMakeQueryWithSubjectWithSpecialCharacters(self):
|
|
@@ -411,6 +407,10 @@ class TestQuerybuilder(unittest.TestCase):
|
|
|
411
407
|
for _in, _out in search_term_tests:
|
|
412
408
|
self.assertEqual(munge_search_term(_in), _out)
|
|
413
409
|
|
|
410
|
+
def test_query_builder_unknown_sort(self):
|
|
411
|
+
results = self.querybuilder(query=self.query, sort_on="unknown")
|
|
412
|
+
self.assertEqual(len(results), 1)
|
|
413
|
+
|
|
414
414
|
|
|
415
415
|
class TestQuerybuilderResultTypes(unittest.TestCase):
|
|
416
416
|
layer = TEST_PROFILE_PLONEAPPQUERYSTRING_INTEGRATION_TESTING
|
|
@@ -191,7 +191,14 @@ class TestQueryParser(TestQueryParserBase):
|
|
|
191
191
|
sort_on="unknown",
|
|
192
192
|
sort_order="reverse",
|
|
193
193
|
)
|
|
194
|
-
self.assertEqual(
|
|
194
|
+
self.assertEqual(
|
|
195
|
+
parsed,
|
|
196
|
+
{
|
|
197
|
+
"Title": {"query": "Welcome to Plone"},
|
|
198
|
+
"sort_on": "unknown",
|
|
199
|
+
"sort_order": "reverse",
|
|
200
|
+
},
|
|
201
|
+
)
|
|
195
202
|
|
|
196
203
|
def test_path_explicit(self):
|
|
197
204
|
data = {
|
|
@@ -2,8 +2,10 @@ from plone.app.querystring.interfaces import IQuerystringRegistryReader
|
|
|
2
2
|
from plone.app.querystring.registryreader import DottedDict
|
|
3
3
|
from plone.app.querystring.testing import PLONEAPPQUERYSTRING_INTEGRATION_TESTING
|
|
4
4
|
from plone.app.querystring.tests import registry_testdata as td
|
|
5
|
+
from plone.app.testing import logout
|
|
5
6
|
from plone.registry import Registry
|
|
6
7
|
from plone.registry.interfaces import IRegistry
|
|
8
|
+
from unittest import mock
|
|
7
9
|
from zope.component import getGlobalSiteManager
|
|
8
10
|
from zope.interface import implementer
|
|
9
11
|
from zope.schema.interfaces import IVocabularyFactory
|
|
@@ -97,6 +99,23 @@ class TestRegistryReader(unittest.TestCase):
|
|
|
97
99
|
vocabulary_result = result.get("plone.app.querystring.field.reviewState.values")
|
|
98
100
|
self.assertEqual(vocabulary_result, {"subsite term": {"title": "subsite term"}})
|
|
99
101
|
|
|
102
|
+
def test_get_vocabularies_checks_permission(self):
|
|
103
|
+
logout()
|
|
104
|
+
from plone.app.content.browser.vocabulary import PERMISSIONS
|
|
105
|
+
|
|
106
|
+
with mock.patch.dict(
|
|
107
|
+
PERMISSIONS,
|
|
108
|
+
{"plone.app.querystring.tests.testvocabulary": "Manage portal content"},
|
|
109
|
+
):
|
|
110
|
+
registry = self.createRegistry(td.test_vocabulary_xml)
|
|
111
|
+
reader = IQuerystringRegistryReader(registry)
|
|
112
|
+
result = reader.parseRegistry()
|
|
113
|
+
result = reader.getVocabularyValues(result)
|
|
114
|
+
vocabulary_result = result.get(
|
|
115
|
+
"plone.app.querystring.field.reviewState.values"
|
|
116
|
+
)
|
|
117
|
+
self.assertEqual(vocabulary_result, {})
|
|
118
|
+
|
|
100
119
|
def test_map_operations_clean(self):
|
|
101
120
|
"""tests if mapOperations is getting all operators correctly"""
|
|
102
121
|
registry = self.createRegistry(td.minimal_correct_xml)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plone.app.querystring
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0a2
|
|
4
4
|
Summary: A queryparser, querybuilder and extra helper tools, to parse stored queries to actual results, used in new style Plone collections
|
|
5
5
|
Home-page: https://github.com/plone/plone.app.querystring
|
|
6
6
|
Author: Plone Foundation
|
|
@@ -9,18 +9,13 @@ License: GPL version 2
|
|
|
9
9
|
Keywords: collection queries
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Framework :: Plone
|
|
12
|
-
Classifier: Framework :: Plone :: 6.
|
|
13
|
-
Classifier: Framework :: Plone :: 6.1
|
|
12
|
+
Classifier: Framework :: Plone :: 6.2
|
|
14
13
|
Classifier: Framework :: Plone :: Core
|
|
15
14
|
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
|
16
15
|
Classifier: Programming Language :: Python
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
-
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
-
Requires-Python: >=3.9
|
|
23
|
-
Requires-Dist: setuptools
|
|
18
|
+
Requires-Python: >=3.10
|
|
24
19
|
Requires-Dist: plone.app.contentlisting
|
|
25
20
|
Requires-Dist: plone.app.registry>=1.1
|
|
26
21
|
Requires-Dist: plone.app.vocabularies
|
|
@@ -30,12 +25,12 @@ Requires-Dist: plone.i18n
|
|
|
30
25
|
Requires-Dist: plone.registry
|
|
31
26
|
Requires-Dist: plone.uuid
|
|
32
27
|
Requires-Dist: Products.GenericSetup
|
|
33
|
-
Requires-Dist: Products.ZCatalog
|
|
34
28
|
Requires-Dist: python-dateutil
|
|
35
29
|
Requires-Dist: Zope
|
|
36
30
|
Requires-Dist: zope.dottedname
|
|
37
31
|
Requires-Dist: zope.globalrequest
|
|
38
32
|
Provides-Extra: test
|
|
33
|
+
Requires-Dist: plone.app.content; extra == "test"
|
|
39
34
|
Requires-Dist: plone.app.testing; extra == "test"
|
|
40
35
|
Requires-Dist: plone.app.contenttypes[test]; extra == "test"
|
|
41
36
|
Dynamic: author
|
|
@@ -93,14 +88,14 @@ Changelog
|
|
|
93
88
|
|
|
94
89
|
.. towncrier release notes start
|
|
95
90
|
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
3.0.0a2 (2025-11-26)
|
|
92
|
+
--------------------
|
|
98
93
|
|
|
99
|
-
|
|
94
|
+
Bug fixes:
|
|
100
95
|
|
|
101
96
|
|
|
102
|
-
-
|
|
103
|
-
|
|
97
|
+
- Don't ignore sort_on values which are not ZCatalog indexes. @davisagli (#173)
|
|
98
|
+
- Don't include vocabulary values in QuerystringRegistryReader results if the current user doesn't have permission for the vocabulary. @davisagli
|
|
104
99
|
|
|
105
100
|
|
|
106
101
|
Tests:
|
|
@@ -109,6 +104,16 @@ Tests:
|
|
|
109
104
|
- Fix tests for ``not`` queries in ``Products.ZCatalog`` 7.2.0+. [maurits]
|
|
110
105
|
|
|
111
106
|
|
|
107
|
+
3.0.0a1 (2025-11-19)
|
|
108
|
+
--------------------
|
|
109
|
+
|
|
110
|
+
Breaking changes:
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
- Replace ``pkg_resources`` namespace with PEP 420 native namespace.
|
|
114
|
+
Support only Plone 6.2 and Python 3.10+. (#3928)
|
|
115
|
+
|
|
116
|
+
|
|
112
117
|
2.1.4 (2025-09-11)
|
|
113
118
|
------------------
|
|
114
119
|
|
|
@@ -6,16 +6,13 @@ pyproject.toml
|
|
|
6
6
|
setup.py
|
|
7
7
|
docs/LICENSE.GPL
|
|
8
8
|
docs/LICENSE.txt
|
|
9
|
-
src/plone/__init__.py
|
|
10
9
|
src/plone.app.querystring.egg-info/PKG-INFO
|
|
11
10
|
src/plone.app.querystring.egg-info/SOURCES.txt
|
|
12
11
|
src/plone.app.querystring.egg-info/dependency_links.txt
|
|
13
12
|
src/plone.app.querystring.egg-info/entry_points.txt
|
|
14
|
-
src/plone.app.querystring.egg-info/namespace_packages.txt
|
|
15
13
|
src/plone.app.querystring.egg-info/not-zip-safe
|
|
16
14
|
src/plone.app.querystring.egg-info/requires.txt
|
|
17
15
|
src/plone.app.querystring.egg-info/top_level.txt
|
|
18
|
-
src/plone/app/__init__.py
|
|
19
16
|
src/plone/app/querystring/__init__.py
|
|
20
17
|
src/plone/app/querystring/configure.zcml
|
|
21
18
|
src/plone/app/querystring/hiddenprofiles.py
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
setuptools
|
|
2
1
|
plone.app.contentlisting
|
|
3
2
|
plone.app.registry>=1.1
|
|
4
3
|
plone.app.vocabularies
|
|
@@ -8,12 +7,12 @@ plone.i18n
|
|
|
8
7
|
plone.registry
|
|
9
8
|
plone.uuid
|
|
10
9
|
Products.GenericSetup
|
|
11
|
-
Products.ZCatalog
|
|
12
10
|
python-dateutil
|
|
13
11
|
Zope
|
|
14
12
|
zope.dottedname
|
|
15
13
|
zope.globalrequest
|
|
16
14
|
|
|
17
15
|
[test]
|
|
16
|
+
plone.app.content
|
|
18
17
|
plone.app.testing
|
|
19
18
|
plone.app.contenttypes[test]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__import__("pkg_resources").declare_namespace(__name__)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__import__("pkg_resources").declare_namespace(__name__)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/results.pt
RENAMED
|
File without changes
|
{plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/testing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plone_app_querystring-2.1.5 → plone_app_querystring-3.0.0a2}/src/plone/app/querystring/upgrades.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|