mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V4.1-BUG-FIX to HEAD
38869: Merged BRANCHES/DEV/AMILLER/CLOUD1 to BRANCHES/DEV/V4.1-BUG-FIX 38762: Site can not be created when (site count) quota exceeded Refactor core code to return "400 - Bad request," with indicative message, when a duplicate url is submitted. 38897: ALF-13969: Tomcat shutdown with WARNING: Problem with directory [/opt/alfresco-4.0.1/tomcat/shared/lib], exists: [false], isDirectory: [false], canRead: [false] - Removed ${catalina.base}/shared/lib/*.jar from shared.loader definition in catalina.properties - Will update Wiki next 38908: Fix for failing test since createSite change 38939: Moved schema version up to 5100 (and 5101 for 'patch.show.audit') 38941: Moved schema version up to 5110 (and 5111 for 'patch.show.audit') ... leave root for V4.1.0.x 38953: ALF-14766: Ensure that DocLib tree drop targets are correctly set after creating new folders 38954: Fix for ALF-14475: "CMIS : Wrong cmisra:numItems in folder sites and below with /cmisatom binding url" 38974: Minor: removed unused code 38987: ALF-13228 - updated manage permissions to handle custom group settings 39006: Fix for ALF-14475 part 2: "CMIS : Wrong cmisra:numItems in folder sites and below with /cmisatom binding url" 39022: Merge solution for ALF-13972 39038: ALF-14388: Merge V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 39037: ALF-15069 CLONE - Edit Online option is not supported for '.docm', 'dotm', '.xlsm' files - Added "Online Edit" support for: docx docm dotx dotm - doc and docx were already supported pptm ppsx ppsm potx potm ppam sldx sldm - ppt and pptx were already supported xltx xlsm xltm xlam xlsb - xls and xlsx were already supported 39065: ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups - first round of fixes on the SOLR side - ACL lookup improved and reduced the number of Long objects created - Specific cache and configuration for PATH queries (with admin reporting) - Specfic cache and configuration for AUTHORITY queries (with admin reporting) - PATH and AUTHORITY queries cache the LEAF result (and not the AUX result which requires lots of extra work) - cache works better with lucene query implementation - AUTHORITY query supports AUTHORITIES separated by "|" 39135: Fix for ALF-15071 SOLR: Typographical offence in log output 39152: ALF-13211: Accepted path for preventing NPE when viewing JBPM sub-process which has no start-task 39175: Merge DEV to V4.1-BUG-FIX (4.1.1) 39161: ALF-14956 : Folder within a Folder navigation issue. Fix for browsing to folders from not first page of a parent folder. 39191: ALF-14863: no scope is available when ScriptNode is used from within Activiti expression, causes issue when scope is needed (eg. creating javascript-arrays) + fixed typo in activiti-source jars 39192: Fix for ALF-12209 Incorrect behavior on View Realtionship for the user who has no permissions - skip relationships to objects that can not be seen. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@40263 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -70,7 +70,10 @@ import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.ApplicationContextHelper;
|
||||
import org.alfresco.util.FileFilterMode;
|
||||
import org.alfresco.util.FileFilterMode.Client;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
@@ -1369,4 +1372,49 @@ public class FileFolderServiceImplTest extends TestCase
|
||||
assertNotNull(pagingResults.getPage());
|
||||
assertEquals(1, pagingResults.getPage().size());
|
||||
}
|
||||
|
||||
public void testListHiddenFiles()
|
||||
{
|
||||
// Test that hidden files are not returned for clients that should not be able to see them,
|
||||
// and that the total result count is correct.
|
||||
|
||||
Client saveClient = FileFilterMode.setClient(Client.webdav);
|
||||
try
|
||||
{
|
||||
// create some hidden files
|
||||
NodeRef nodeRef = fileFolderService.create(workingRootNodeRef, "" + System.currentTimeMillis(), ContentModel.TYPE_CONTENT).getNodeRef();
|
||||
NodeRef nodeRef1 = fileFolderService.create(nodeRef, "parent", ContentModel.TYPE_CONTENT).getNodeRef();
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
fileFolderService.create(nodeRef1, ".child" + i, ContentModel.TYPE_CONTENT).getNodeRef();
|
||||
}
|
||||
|
||||
// and some visible files
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
fileFolderService.create(nodeRef1, "visiblechild" + i, ContentModel.TYPE_CONTENT).getNodeRef();
|
||||
}
|
||||
|
||||
// switch to a client that should not see the hidden files
|
||||
saveClient = FileFilterMode.setClient(Client.cmis);
|
||||
PagingRequest pagingRequest = new PagingRequest(0, Integer.MAX_VALUE);
|
||||
pagingRequest.setRequestTotalCountMax(10000); // need this so that total count is set
|
||||
|
||||
PagingResults<FileInfo> results = fileFolderService.list(nodeRef1, true, true, null, null, pagingRequest);
|
||||
Pair<Integer, Integer> totalResultCount = results.getTotalResultCount();
|
||||
assertNotNull(totalResultCount.getFirst());
|
||||
assertEquals("Total result lower count should be 10", 10, totalResultCount.getFirst().intValue());
|
||||
assertNotNull(totalResultCount.getSecond());
|
||||
assertEquals("Total result upper count should be 10", 10, totalResultCount.getSecond().intValue());
|
||||
for(FileInfo fileInfo : results.getPage())
|
||||
{
|
||||
assertTrue(fileInfo.getName().startsWith("visiblechild"));
|
||||
}
|
||||
assertEquals("Expected only 10 results", 10, results.getPage().size());
|
||||
}
|
||||
finally
|
||||
{
|
||||
FileFilterMode.setClient(saveClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user