Only allow selection of shared content types
authorThierry Florac <tflorac@ulthar.net>
Fri, 15 Feb 2019 12:55:25 +0100
changeset 1282 498f90fe8d7b
parent 1281 327666db65f9
child 1283 8e96d653a9ff
Only allow selection of shared content types
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"),