# HG changeset patch # User Thierry Florac # Date 1550231725 -3600 # Node ID 498f90fe8d7be9fc8af9c514c7e446f232936f6d # Parent 327666db65f922268541846b94f69417b28a61e1 Only allow selection of shared content types diff -r 327666db65f9 -r 498f90fe8d7b src/pyams_content/features/search/interfaces.py --- a/src/pyams_content/features/search/interfaces.py Fri Feb 15 12:53:57 2019 +0100 +++ b/src/pyams_content/features/search/interfaces.py Fri Feb 15 12:55:25 2019 +0100 @@ -15,8 +15,9 @@ from zope.interface import Interface from zope.schema import Bool, Choice, Set +from pyams_content import _ from pyams_content.interfaces import GUEST_ROLE, IBaseContent, MANAGER_ROLE -from pyams_content.shared.common.interfaces import CONTENT_TYPES_VOCABULARY +from pyams_content.shared.common.interfaces import SHARED_CONTENT_TYPES_VOCABULARY from pyams_content.shared.common.interfaces.types import ALL_DATA_TYPES_VOCABULARY from pyams_content.shared.site.interfaces import IBaseSiteItem, ISiteElement from pyams_content.shared.view import IWfView @@ -24,11 +25,9 @@ from pyams_i18n.schema import I18nTextLineField from pyams_portal.interfaces import DESIGNER_ROLE from pyams_security.schema import PrincipalsSet -from pyams_sequence.interfaces import ISequentialIdTarget, IInternalReference +from pyams_sequence.interfaces import IInternalReference, ISequentialIdTarget from pyams_sequence.schema import InternalReferenceField -from pyams_content import _ - class ISearchManagerInfo(IInternalReference): """Search manager interface""" @@ -91,7 +90,7 @@ selected_content_types = Set(title=_("Selected content types"), description=_("Searched content types; leave empty for all"), - value_type=Choice(vocabulary=CONTENT_TYPES_VOCABULARY), + value_type=Choice(vocabulary=SHARED_CONTENT_TYPES_VOCABULARY), required=False) selected_datatypes = Set(title=_("Selected data types"),