Merged 5.2.0 (5.2.0) to HEAD (5.2)

133112 rmunteanu: REPO-557: Retrieve Permissions For Node
      -  Fixed build failure


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@133392 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-12-06 17:18:14 +00:00
parent e420b16bda
commit 4d6e3974f5

View File

@@ -3955,16 +3955,18 @@ public class NodeApiTest extends AbstractSingleNetworkSiteTest
*/
private void createAuthorityContext(String user)
{
String groupName = "Group_ROOT" + GUID.generate();
AuthenticationUtil.setRunAsUser(user);
if (rootGroupName == null)
{
rootGroupName = authorityService.getName(AuthorityType.GROUP, "GroupsTest_ROOT");
rootGroupName = authorityService.getName(AuthorityType.GROUP, groupName);
}
if (!authorityService.authorityExists(rootGroupName))
{
AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser();
rootGroupName = authorityService.createAuthority(AuthorityType.GROUP, "GroupsTest_ROOT");
rootGroupName = authorityService.createAuthority(AuthorityType.GROUP, groupName);
groupA = authorityService.createAuthority(AuthorityType.GROUP, "Test_GroupA");
authorityService.addAuthority(rootGroupName, groupA);
groupB = authorityService.createAuthority(AuthorityType.GROUP, "Test_GroupB");