@Test public void testCanValidateAsTeacher() { setupCurrentUser(teacher1); Assert.assertTrue("Must be able to validate", validator.canValidate(EntityNames.COURSE_TRANSCRIPT, false)); Assert.assertTrue("Must be able to validate", validator.canValidate(EntityNames.COURSE_TRANSCRIPT, true)); Assert.assertFalse("Must not be able to validate", validator.canValidate(EntityNames.ADMIN_DELEGATION, false)); }
@Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.COURSE_TRANSCRIPT.equals(entityType); }
TeacherToCourseTranscriptValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.COURSE_TRANSCRIPT.equals(entityType); } }
TeacherToCourseTranscriptValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.COURSE_TRANSCRIPT.equals(entityType); }  }
TeacherToCourseTranscriptValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.COURSE_TRANSCRIPT.equals(entityType); }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext(); }
TeacherToCourseTranscriptValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.COURSE_TRANSCRIPT.equals(entityType); }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext();  }