mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-11 13:48:37 +02:00
fix removal for V1
This commit is contained in:
parent
cac817ed56
commit
4437e1cf30
@ -7,6 +7,7 @@ import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
@ -219,6 +220,21 @@ public class AccountWebController {
|
||||
List<User> allUsers = userRepository.findAllWithTeam();
|
||||
Iterator<User> iterator = allUsers.iterator();
|
||||
Map<String, String> roleDetails = Role.getAllRoleDetails();
|
||||
|
||||
// Filter role details to only show SYSTEM_ADMIN, USER, and DEMO_USER in UI
|
||||
Map<String, String> filteredRoleDetails = new LinkedHashMap<>();
|
||||
String[] allowedRoles = {
|
||||
Role.SYSTEM_ADMIN.getRoleId(),
|
||||
Role.USER.getRoleId(),
|
||||
Role.DEMO_USER.getRoleId()
|
||||
};
|
||||
|
||||
for (String roleId : allowedRoles) {
|
||||
if (roleDetails.containsKey(roleId)) {
|
||||
filteredRoleDetails.put(roleId, roleDetails.get(roleId));
|
||||
}
|
||||
}
|
||||
roleDetails = filteredRoleDetails;
|
||||
// Map to store session information and user activity status
|
||||
Map<String, Boolean> userSessions = new HashMap<>();
|
||||
Map<String, Date> userLastRequest = new HashMap<>();
|
||||
|
Loading…
Reference in New Issue
Block a user