Reading yml file based lesson configuration

This commit is contained in:
Nanne Baars
2016-06-29 00:23:29 +02:00
parent 966e5b9e0a
commit f12c06fc55
7 changed files with 193 additions and 35 deletions

View File

@ -31,6 +31,7 @@
package org.owasp.webgoat.controller;
import org.owasp.webgoat.lessons.RandomLessonAdapter;
import org.owasp.webgoat.plugins.YmlBasedLesson;
import org.owasp.webgoat.session.WebSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -63,7 +64,8 @@ public class StartLesson {
model.addObject("lesson", ws.getCurrentLesson());
model.addObject("message", ws.getMessage());
model.addObject("instructions", ws.getInstructions());
model.addObject("migrated", refactored.contains(ws.getCurrentLesson().getClass().getSimpleName())); //remove after ECS removal otherwise you will see the lesson twice
boolean isMigrated = ws.getCurrentLesson() instanceof YmlBasedLesson;
model.addObject("migrated", isMigrated); //remove after ECS removal otherwise you will see the lesson twice
model.setViewName("lesson_content");
return model;
}