Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

58201: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      58101: Merged V4.1-BUG-FIX (4.1.8) to V4.2-BUG-FIX (4.2.1)
          58100: Build/test fixes after R 58059 revised fix for MNT-9794   Authorities with duplicate names can be easilly created using « AuthorityService »


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61940 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 22:54:36 +00:00
parent c73ea33431
commit 349356d20c

View File

@@ -472,7 +472,7 @@ public class SiteServiceTest extends BaseWebScriptTest
String testGroup = "SiteServiceTestGroupA";
String testGroupName = "GROUP_" + testGroup;
if(!authorityService.authorityExists(testGroup))
if(!authorityService.authorityExists(testGroupName))
{
this.authenticationComponent.setSystemUserAsCurrentUser();
@@ -1092,12 +1092,17 @@ public class SiteServiceTest extends BaseWebScriptTest
String testGroup = "SiteServiceTestGroupA";
String testGroupName = "GROUP_" + testGroup;
if (!authorityService.authorityExists(testGroup))
if (!authorityService.authorityExists(testGroupName))
{
this.authenticationComponent.setSystemUserAsCurrentUser();
testGroupName = authorityService.createAuthority(AuthorityType.GROUP, testGroup,
testGroup, authorityService.getDefaultZones());
}
if(!authorityService.getContainedAuthorities(AuthorityType.USER, testGroupName, true).contains(USER_TWO))
{
this.authenticationComponent.setSystemUserAsCurrentUser();
this.authorityService.addAuthority(testGroupName, USER_TWO);
}