committing for local test purposes unrelated to webgoat
This commit is contained in:
parent
f57d076fab
commit
c5535603dc
@ -34,6 +34,7 @@ import org.owasp.webgoat.lessons.AbstractLesson;
|
|||||||
import org.owasp.webgoat.lessons.RandomLessonAdapter;
|
import org.owasp.webgoat.lessons.RandomLessonAdapter;
|
||||||
import org.owasp.webgoat.plugins.YmlBasedLesson;
|
import org.owasp.webgoat.plugins.YmlBasedLesson;
|
||||||
import org.owasp.webgoat.session.WebSession;
|
import org.owasp.webgoat.session.WebSession;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
import org.springframework.security.core.context.SecurityContext;
|
import org.springframework.security.core.context.SecurityContext;
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
@ -60,6 +61,7 @@ public class StartLesson {
|
|||||||
* @param request a {@link HttpServletRequest} object.
|
* @param request a {@link HttpServletRequest} object.
|
||||||
* @return a {@link ModelAndView} object.
|
* @return a {@link ModelAndView} object.
|
||||||
*/
|
*/
|
||||||
|
@PreAuthorize(hasAnyRole('foo'));
|
||||||
@RequestMapping(path = "startlesson.mvc", method = {RequestMethod.GET, RequestMethod.POST})
|
@RequestMapping(path = "startlesson.mvc", method = {RequestMethod.GET, RequestMethod.POST})
|
||||||
public ModelAndView start(HttpServletRequest request) {
|
public ModelAndView start(HttpServletRequest request) {
|
||||||
ModelAndView model = new ModelAndView();
|
ModelAndView model = new ModelAndView();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user