mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
12083: Fix for ETHREEOH-790 - when using external auth such as NTLM the Change Password and Logout features are no longer available in the Share UI. 12085: ETHREEOH-565: Failure to generate flash preview for PPT file 12086: ETHREEOH-903 Sites drop-down Favorites UI improvements ETHREEOH-904 My Sites dashlet Favorites UI improvements ETHREEOH-547 User who is not a site manager can delete sites: my sites dashlet and sites page 12093: ETHREEOH-861, ETHREEOH-928 12094: Remove __MACOSX folder that has appeared in Share webapp 12096: Removed spurious files from YUI 2.6.0 distribution 12100: ETHREEOH-929 Tightening up transport adapters field (should never be shown for ASR) 12104: Fix for ETHREEOH-944. Admin now able to reset user home location again ((regression). 12105: Fixed: ETHREEOH-934 Multi-clicking Site favoriate icons can cause multiple requests before others finish and effectively cause a browser lock-up until page refresh 12106: Exception needs to be rethrown after releasing packet to the memory pool on a Winsock NetBIOS receive. ETHREEOH-628. 12110: An i18n message didn't work for failures. Related to ETHREEOH-934 Multi-clicking Site favoriate icons can cause multiple requests before others finish and effectively cause a browser lock-up until page refresh 12115: Added unit test to check for cm:folder-derived type support 12116: Removed unused, old patch-related query 12117: Merged V2.2 to V3.0 11454: Fixed ASH-7: QName fetching is inefficient when run without L2 cache 12118: Fixed compilation error after merge 12119: DM User Usages - 2nd pass (fix ETHREEOH-677) 12122: UserUsage does nothing if system is READ-ONLY. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12500 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -105,7 +105,7 @@ public class FileFolderServiceImpl implements FileFolderService
|
||||
private MimetypeService mimetypeService;
|
||||
|
||||
// TODO: Replace this with a more formal means of identifying "system" folders (i.e. aspect or UUID)
|
||||
private List systemPaths;
|
||||
private List<String> systemPaths;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
|
@@ -36,6 +36,9 @@ import junit.framework.TestCase;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.dictionary.DictionaryDAO;
|
||||
import org.alfresco.repo.dictionary.M2Model;
|
||||
import org.alfresco.repo.dictionary.M2Type;
|
||||
import org.alfresco.repo.node.integrity.IntegrityChecker;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
@@ -83,6 +86,7 @@ public class FileFolderServiceImplTest extends TestCase
|
||||
private TransactionService transactionService;
|
||||
private NodeService nodeService;
|
||||
private FileFolderService fileFolderService;
|
||||
private DictionaryDAO dictionaryDAO;
|
||||
private UserTransaction txn;
|
||||
private NodeRef rootNodeRef;
|
||||
private NodeRef workingRootNodeRef;
|
||||
@@ -94,6 +98,7 @@ public class FileFolderServiceImplTest extends TestCase
|
||||
transactionService = serviceRegistry.getTransactionService();
|
||||
nodeService = serviceRegistry.getNodeService();
|
||||
fileFolderService = serviceRegistry.getFileFolderService();
|
||||
dictionaryDAO = (DictionaryDAO) ctx.getBean("dictionaryDAO");
|
||||
AuthenticationComponent authenticationComponent = (AuthenticationComponent) ctx.getBean("authenticationComponent");
|
||||
|
||||
// start the transaction
|
||||
@@ -408,6 +413,32 @@ public class FileFolderServiceImplTest extends TestCase
|
||||
{
|
||||
rollbackTxn.rollback();
|
||||
}
|
||||
// Create a cm:folder derived type
|
||||
try
|
||||
{
|
||||
rollbackTxn = transactionService.getNonPropagatingUserTransaction();
|
||||
rollbackTxn.begin();
|
||||
// Create a new model
|
||||
String testNs = "http://www.alfresco.org/model/test111/1.0";
|
||||
M2Model testModel = M2Model.createModel("t111:filefolderserviceimpltest");
|
||||
testModel.createNamespace(testNs, "t111");
|
||||
testModel.createImport(NamespaceService.DICTIONARY_MODEL_1_0_URI, NamespaceService.DICTIONARY_MODEL_PREFIX);
|
||||
testModel.createImport(NamespaceService.SYSTEM_MODEL_1_0_URI, NamespaceService.SYSTEM_MODEL_PREFIX);
|
||||
testModel.createImport(NamespaceService.CONTENT_MODEL_1_0_URI, NamespaceService.CONTENT_MODEL_PREFIX);
|
||||
|
||||
M2Type testType = testModel.createType("t111:subfolder");
|
||||
testType.setParentName("cm:" + ContentModel.TYPE_FOLDER.getLocalName());
|
||||
dictionaryDAO.putModel(testModel);
|
||||
fileFolderService.create(parentFolderRef, "Legal subtype of folder", QName.createQName(testNs, "subfolder"));
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
throw new Exception("Legal subtype of cm:folder not allowed.", e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
rollbackTxn.rollback();
|
||||
}
|
||||
|
||||
// create a file
|
||||
FileInfo fileInfo = fileFolderService.create(parentFolderRef, "newFile", ContentModel.TYPE_CONTENT);
|
||||
|
Reference in New Issue
Block a user