@Test public void testCanValidateTeacherToStaff() throws Exception { setupCurrentUser(staff1); assertTrue(validator.canValidate(EntityNames.STAFF, true)); assertFalse(validator.canValidate(EntityNames.STAFF, false)); assertFalse(validator.canValidate(EntityNames.SECTION, false)); assertFalse(validator.canValidate(EntityNames.SECTION, true)); }
@Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); }
TransitiveStaffToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); } }
TransitiveStaffToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); }  }
TransitiveStaffToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); }  @Override boolean canValidate(String entityType, boolean transitive); @SuppressWarnings("unchecked") @Override Set<String> validate(String entityName, Set<String> staffIds); @Override SecurityUtil.UserContext getContext(); }
TransitiveStaffToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); }  @Override boolean canValidate(String entityType, boolean transitive); @SuppressWarnings("unchecked") @Override Set<String> validate(String entityName, Set<String> staffIds); @Override SecurityUtil.UserContext getContext();  }