diff -r 6aca2a06cbe3 -r 780d6776a857 src/pyams_content/root/zmi/__init__.py --- a/src/pyams_content/root/zmi/__init__.py Wed Jun 27 15:15:13 2018 +0200 +++ b/src/pyams_content/root/zmi/__init__.py Wed Jun 27 15:15:38 2018 +0200 @@ -172,6 +172,7 @@ for tool in get_all_utilities_registered_for(IBaseSharedTool): workflow = IWorkflow(tool) query = Eq(catalog['parents'], intids.register(tool)) & \ + Any(catalog['content_type'], CONTENT_TYPES.keys()) & \ Any(catalog['workflow_state'], workflow.waiting_states) params = params | query if params else query return filter(self.check_access, @@ -218,6 +219,7 @@ for tool in get_all_utilities_registered_for(IBaseSharedTool): workflow = IWorkflow(tool) query = Eq(catalog['parents'], intids.register(tool)) & \ + Any(catalog['content_type'], CONTENT_TYPES.keys()) & \ Any(catalog['workflow_state'], workflow.waiting_states) & \ Eq(catalog['workflow_principal'], self.request.principal.id) params = params | query if params else query @@ -379,6 +381,7 @@ for tool in get_all_utilities_registered_for(IBaseSharedTool): workflow = IWorkflow(tool) query = And(Eq(catalog['parents'], intids.register(tool)), + Any(catalog['content_type'], CONTENT_TYPES.keys()) & \ Or(Eq(catalog['role:owner'], self.request.principal.id), Eq(catalog['role:contributor'], self.request.principal.id)), Eq(catalog['workflow_state'], workflow.initial_state)) @@ -440,6 +443,7 @@ for tool in get_all_utilities_registered_for(IBaseSharedTool): workflow = IWorkflow(tool) query = And(Eq(catalog['parents'], intids.register(tool)), + Any(catalog['content_type'], CONTENT_TYPES.keys()) & \ Or(Eq(catalog['role:owner'], self.request.principal.id), Eq(catalog['role:contributor'], self.request.principal.id)), Any(catalog['workflow_state'], workflow.waiting_states)) @@ -501,6 +505,7 @@ for tool in get_all_utilities_registered_for(IBaseSharedTool): workflow = IWorkflow(tool) query = And(Eq(catalog['parents'], intids.register(tool)), + Any(catalog['content_type'], CONTENT_TYPES.keys()) & \ Or(Eq(catalog['role:owner'], self.request.principal.id), Eq(catalog['role:contributor'], self.request.principal.id)), Any(catalog['workflow_state'], workflow.published_states)) @@ -562,6 +567,7 @@ for tool in get_all_utilities_registered_for(IBaseSharedTool): workflow = IWorkflow(tool) query = And(Eq(catalog['parents'], intids.register(tool)), + Any(catalog['content_type'], CONTENT_TYPES.keys()) & \ Or(Eq(catalog['role:owner'], self.request.principal.id), Eq(catalog['role:contributor'], self.request.principal.id)), Any(catalog['workflow_state'], workflow.retired_states)) @@ -625,6 +631,7 @@ for tool in get_all_utilities_registered_for(IBaseSharedTool): workflow = IWorkflow(tool) query = And(Eq(catalog['parents'], intids.register(tool)), + Any(catalog['content_type'], CONTENT_TYPES.keys()) & \ Or(Eq(catalog['role:owner'], principal_id), Eq(catalog['role:contributor'], principal_id)), Any(catalog['workflow_state'], workflow.archived_states)) @@ -714,6 +721,7 @@ for tool in get_all_utilities_registered_for(IBaseSharedTool): workflow = IWorkflow(tool) query = And(Eq(catalog['parents'], intids.register(tool)), + Any(catalog['content_type'], CONTENT_TYPES.keys()) & \ Any(catalog['workflow_state'], workflow.published_states)) params = params | query if params else query return unique(CatalogResultSet(CatalogQuery(catalog).query(params,