def searchResults(self, query=None, sql_catalog_id=None, local_roles=None, **kw): """ Calls ZCatalog.searchResults with extra arguments that limit the results to what the user is allowed to see. """ #if not _checkPermission( # Permissions.AccessInactivePortalContent, self): # now = DateTime() # kw[ 'effective' ] = { 'query' : now, 'range' : 'max' } # kw[ 'expires' ] = { 'query' : now, 'range' : 'min' } catalog_id = self.getPreferredSQLCatalogId(sql_catalog_id) query = self.getSecurityQuery( query=query, sql_catalog_id=catalog_id, local_roles=local_roles, ) if query is not None: kw['query'] = query kw.setdefault('limit', self.default_result_limit) # get catalog from preference #LOG("searchResult", INFO, catalog_id) # LOG("searchResult", INFO, ZCatalog.searchResults(self, query=query, sql_catalog_id=catalog_id, src__=1, **kw)) return ZCatalog.searchResults(self, sql_catalog_id=catalog_id, **kw)
def searchResults(self, query=None, **kw): """ Calls ZCatalog.searchResults with extra arguments that limit the results to what the user is allowed to see. """ #if not _checkPermission( # Permissions.AccessInactivePortalContent, self): # now = DateTime() # kw[ 'effective' ] = { 'query' : now, 'range' : 'max' } # kw[ 'expires' ] = { 'query' : now, 'range' : 'min' } catalog_id = self.getPreferredSQLCatalogId(kw.pop("sql_catalog_id", None)) query = self.getSecurityQuery(query=query, sql_catalog_id=catalog_id, **kw) kw.setdefault('limit', self.default_result_limit) # get catalog from preference #LOG("searchResult", INFO, catalog_id) # LOG("searchResult", INFO, ZCatalog.searchResults(self, query=query, sql_catalog_id=catalog_id, src__=1, **kw)) return ZCatalog.searchResults(self, query=query, sql_catalog_id=catalog_id, **kw)
def unrestrictedSearchResults(self, REQUEST=None, **kw): """Calls ZSQLCatalog.searchResults directly without restrictions. """ kw.setdefault('limit', self.default_result_limit) return ZCatalog.searchResults(self, REQUEST, **kw)
def unrestrictedSearchResults(self, **kw): """Calls ZSQLCatalog.searchResults directly without restrictions. """ kw.setdefault('limit', self.default_result_limit) return ZCatalog.searchResults(self, **kw)