mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
MNT-22600 Nodes with security marks appear unfiltered on CMIS DB queries (#702)
* Change isUnfiltered to protected so we can extend it in enterprise
* Added test method to be able to do a cmis query test
Original commit in governance-services: e4e3235328
This commit is contained in:
@@ -619,11 +619,27 @@ public class BaseRMRestTest extends RestTest
|
||||
* @return
|
||||
*/
|
||||
public List<String> searchForContentAsUser(UserModel user, String term)
|
||||
{
|
||||
String query = "cm:name:*" + term + "*";
|
||||
return searchForContentAsUser(user,query,"afts");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns search results for the given search term
|
||||
*
|
||||
* @param user
|
||||
* @param term
|
||||
* @param query language
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<String> searchForContentAsUser(UserModel user, String q, String queryLanguage)
|
||||
{
|
||||
getRestAPIFactory().getRmRestWrapper().authenticateUser(user);
|
||||
RestRequestQueryModel queryReq = new RestRequestQueryModel();
|
||||
SearchRequest query = new SearchRequest(queryReq);
|
||||
queryReq.setQuery("cm:name:*" + term + "*");
|
||||
queryReq.setQuery(q);
|
||||
queryReq.setLanguage(queryLanguage);
|
||||
|
||||
List<String> names = new ArrayList<>();
|
||||
// wait for solr indexing
|
||||
|
Reference in New Issue
Block a user