if (!SecurityUtils.getSubject().isPermitted("sys:userOnline or monitor:userOnline")) {
throw new UnauthorizedException(MessageUtils.message("no.view.permission", "sys:userOnline或monitor:userOnline"));
}
for (String id : ids) {
UserOnline online = baseService.findOne(id);
if (online == null) {
continue;
}
OnlineSession onlineSession = (OnlineSession) onlineSessionDAO.readSession(online.getId());
if (onlineSession == null) {
continue;
}
onlineSession.setStatus(OnlineSession.OnlineStatus.force_logout);
online.setStatus(OnlineSession.OnlineStatus.force_logout);
baseService.update(online);
}
return redirectToUrl(null);
}