Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/p/r/Products.AdvancedQuery-3.0.3/Products/AdvancedQuery/__init__.py   Products.AdvancedQuery(Download)
if CatalogTool:
 
  from Products.CMFCore.CatalogTool import _getAuthenticatedUser, _checkPermission, AccessInactivePortalContent
 
  def _evalAdvancedQuery(self,query,sortSpecs=()):
    '''evaluate *query* for 'CatalogTool' and sort results according to *sortSpec*.'''
    query = query._clone()
 
    # taken from 'CatalogTool.searchResults'
    user = _getAuthenticatedUser(self)

src/a/n/anthill.querytool-0.2/anthill/querytool/patches.py   anthill.querytool(Download)
    raise Exception, 'You must have AdvancedQuery installed *and* it must be loaded before this package!'
 
  from Products.CMFCore.CatalogTool import _getAuthenticatedUser, _checkPermission, AccessInactivePortalContent
 
  def _evalAdvancedQuery(self,query,sortSpecs=(),wrapSecurity=True):
    if wrapSecurity is True:
        # taken from 'CatalogTool.searchResults'
        user = _getAuthenticatedUser(self)
        query &= In('allowedRolesAndUsers',self._listAllowedRolesAndUsers(user))
        if not _checkPermission(AccessInactivePortalContent,self):