From 349356d20ce0e771e74d3d738681acfd1936f837 Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Tue, 11 Feb 2014 22:54:36 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20HEAD-BUG-FIX=20(4.3/Cloud)=20to=20HEAD?= =?UTF-8?q?=20(4.3/Cloud)=20=20=20=2058201:=20Merged=20V4.2-BUG-FIX=20(4.2?= =?UTF-8?q?.1)=20to=20HEAD-BUG-FIX=20(Cloud/4.3)=20=20=20=20=20=20=2058101?= =?UTF-8?q?:=20Merged=20V4.1-BUG-FIX=20(4.1.8)=20to=20V4.2-BUG-FIX=20(4.2.?= =?UTF-8?q?1)=20=20=20=20=20=20=20=20=20=20=2058100:=20Build/test=20fixes?= =?UTF-8?q?=20after=20R=2058059=20revised=20fix=20for=20MNT-9794=20=20=20A?= =?UTF-8?q?uthorities=20with=20duplicate=20names=20can=20be=20easilly=20cr?= =?UTF-8?q?eated=20using=20=C2=AB=20AuthorityService=20=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61940 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/repo/web/scripts/site/SiteServiceTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/test-java/org/alfresco/repo/web/scripts/site/SiteServiceTest.java b/source/test-java/org/alfresco/repo/web/scripts/site/SiteServiceTest.java index 17f0924740..74453bfd92 100644 --- a/source/test-java/org/alfresco/repo/web/scripts/site/SiteServiceTest.java +++ b/source/test-java/org/alfresco/repo/web/scripts/site/SiteServiceTest.java @@ -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); }