REPO-557: Retrieve Permissions For Node

-  Fixed build failure

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133112 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Raluca Munteanu
2016-11-25 10:38:00 +00:00
parent 6fb7ce78ab
commit c9753d62cd

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");