Skip to content

Commit

Permalink
Added authentication for statistics. Fix #140
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaan Janno committed Dec 4, 2016
1 parent 9f1675e commit ef5adce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public String statisticsPage(Model model, @CookieValue(value = "session", defaul

@RequestMapping("/statistics/{period}")
public String getStatistics(Model model,@PathVariable("period") String period,
@CookieValue(value = "session", defaultValue = "none") String session){

@CookieValue(value = "session", defaultValue = "none") String session) throws UnauthorizedException{
authServ.authenticateRequestForRole(session, Role.ADMINISTRATOR);
StatisticsDTO stats = statServ.getStatistics(period);
model.addAttribute("stats", stats);

Expand Down

0 comments on commit ef5adce

Please sign in to comment.