Apply changes to enable node ownership evaluation to happen on ent. as before (#279)

This commit is contained in:
Nana Insaidoo
2021-02-08 15:21:44 +00:00
committed by GitHub
parent 8db3fc230e
commit e3dca6ecbd
3 changed files with 27 additions and 97 deletions

View File

@@ -201,13 +201,6 @@ public class DBQueryEngineTest
verify(resultContext).stop();
}
@Test
public void shouldIsOwnerReadingReturnFalseWhenTheAuthorityIsNull()
{
boolean result = engine.isOwnerReading(createNode(1), null);
assertFalse(result);
}
private void prepareTemplate(DBQuery dbQuery, List<Node> nodes)
{
doAnswer(invocation -> {

View File

@@ -90,7 +90,18 @@ public class NodePermissionAssessorPermissionsTest
// the node is included
assertFalse(included);
}
@Test
public void shouldIsOwnerReadingReturnFalseWhenTheAuthorityIsNull()
{
Node theNode = mock(Node.class);
NodePermissionAssessor assessor = createAssessor();
boolean result = assessor.isOwnerReading(theNode, null);
assertFalse(result);
}
private NodePermissionAssessor createAssessor()
{
NodeService nodeService = mock(NodeService.class);