Exemplo n.º 1
0
 def get_allowed_roles_and_users(self, for_object):
     processQueue()  # trigger async indexing
     catalog = getToolByName(self.portal, 'portal_catalog')
     path = '/'.join(for_object.getPhysicalPath())
     rid = catalog.getrid(path)
     index_data = catalog.getIndexDataForRID(rid)
     return index_data.get('allowedRolesAndUsers')
Exemplo n.º 2
0
    def _process_indexing_queue(self):
        """Reindex all objects in the indexing queue.

        Process the indexing queue after installing upgrades to ensure that
        its progress is also logged to the ResponseLogger.
        """
        processQueue()
Exemplo n.º 3
0
 def get_allowed_roles_and_users_for(self, obj):
     processQueue()  # trigger async indexing
     catalog = getToolByName(self.portal, 'portal_catalog')
     path = '/'.join(obj.getPhysicalPath())
     rid = catalog.getrid(path)
     index_data = catalog.getIndexDataForRID(rid)
     return index_data.get('allowedRolesAndUsers')
Exemplo n.º 4
0
    def _process_indexing_queue(self):
        """Reindex all objects in the indexing queue.

        Process the indexing queue after installing upgrades to ensure that
        its progress is also logged to the ResponseLogger.
        """
        processQueue()
Exemplo n.º 5
0
 def __call__(self):
     for folder in folders:
         folder.reindexObject()
     # manually trigger processing reindex queue
     processQueue()