Merged 5.2.N (5.2.1) to HEAD (5.2)

127160 cturlica: Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
      127134 cturlica: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)
         127102 rmunteanu: MNT-15614 : Site with name "IT" cannot be managed properly
            - Changed the way the role name is striped out.
            - Implemented tests.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127868 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-06 09:21:06 +00:00
parent 3bf3914916
commit db287e9c24
3 changed files with 64 additions and 5 deletions

View File

@@ -869,6 +869,33 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest
startNewTransaction();
}
public void testMNT_15614() throws Exception
{
RetryingTransactionCallback<Object> work = new RetryingTransactionCallback<Object>()
{
@Override
public Object execute() throws Throwable
{
String[] siteNames = { "it", "site", "GROUP" };
authenticationComponent.setCurrentUser(AuthenticationUtil.getAdminUserName());
for (String siteName : siteNames)
{
siteService.createSite(siteName, siteName, siteName, siteName, SiteVisibility.PUBLIC);
assertEquals( SiteModel.SITE_MANAGER, siteService.getMembersRole(siteName, AuthenticationUtil.getAdminUserName()));
siteService.deleteSite(siteName);
}
return null;
}
};
endTransaction();
transactionService.getRetryingTransactionHelper().doInTransaction(work);
startNewTransaction();
}
/**
* Test listSite case sensitivity
*/