-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Session): Remove stale sessions (#148)
- Upgrade to SpringBoot 2.5.10 to get fix spring-projects/spring-session#1791 - Go through current users and remove any stale sessions when admin accesses index page - Refactor page to show current users to new ShowOnlineUsersController #3
- Loading branch information
1 parent
d5de522
commit b9fe46c
Showing
5 changed files
with
58 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...in/java/org/wise/portal/presentation/web/controllers/admin/ShowOnlineUsersController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.wise.portal.presentation.web.controllers.admin; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.ModelMap; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.wise.portal.service.session.SessionService; | ||
|
||
@Controller | ||
@RequestMapping("/admin/account/show-online-users") | ||
public class ShowOnlineUsersController { | ||
|
||
@Autowired | ||
private SessionService sessionService; | ||
|
||
@GetMapping | ||
protected String show(ModelMap modelMap) { | ||
modelMap.put("loggedInStudentUsernames", sessionService.getLoggedInStudents()); | ||
modelMap.put("loggedInTeacherUsernames", sessionService.getLoggedInTeachers()); | ||
return "admin/account/manageusers"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters