@Test public void testGrade() { Entity student = helper.generateStudent(); helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Entity section = helper.generateSection(otherEdorg.getEntityId()); Entity ssa = helper.generateSSA(student.getEntityId(), section.getEntityId(), false); Entity grade = helper.generateGrade(ssa.getEntityId()); Assert.assertFalse(validator.canAccess(grade)); section = helper.generateSection(myEdOrg.getEntityId()); helper.generateStudentSchoolAssociation(student.getEntityId(), myEdOrg.getEntityId(), "", false); ssa = helper.generateSSA(student.getEntityId(), section.getEntityId(), false); grade = helper.generateGrade(ssa.getEntityId()); Assert.assertTrue(validator.canAccess(grade)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); }  }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); }  boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); }  boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive);  }