Author: david
Date: Fri Oct 23 22:03:52 2009
New Revision: 3826

Log:
Filter search hits by repository and draft permissions. Fixes issue #1094.

Modified:
   trunk/apps/qubit/modules/search/actions/searchAction.class.php

Modified: trunk/apps/qubit/modules/search/actions/searchAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/search/actions/searchAction.class.php      Fri Oct 
23 22:01:20 2009        (r3825)
+++ trunk/apps/qubit/modules/search/actions/searchAction.class.php      Fri Oct 
23 22:03:52 2009        (r3826)
@@ -34,10 +34,8 @@
     $query = new Zend_Search_Lucene_Search_Query_Boolean;
     $query->addSubquery(new Zend_Search_Lucene_Search_Query_Term(new 
Zend_Search_Lucene_Index_Term($culture, 'culture')), true);
 
-    if (!QubitAcl::check(QubitInformationObject::getRoot(), 
QubitAclAction::VIEW_DRAFT_ID))
-    {
-      $query->addSubquery(new Zend_Search_Lucene_Search_Query_Term(new 
Zend_Search_Lucene_Index_Term(QubitTerm::PUBLICATION_STATUS_DRAFT_ID, 
'publicationStatusId')), false);
-    }
+    $query = QubitAcl::searchFilterByRepository($query, 
QubitAclAction::READ_ID);
+    $query = QubitAcl::searchFilterDrafts($query);
 
     
$query->addSubquery(Zend_Search_Lucene_Search_QueryParser::parse($request->query,
 'UTF-8'), true);
 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to