@Override
 public String list(Searchable searchable, Model model) {
   if (!SecurityUtils.getSubject().isPermitted("sys:userOnline:view or monitor:userOnline:view")) {
     throw new UnauthorizedException(
         MessageUtils.message(
             "no.view.permission", "sys:userOnline:view或monitor:userOnline:view"));
   }
   return super.list(searchable, model);
 }
  @RequestMapping("/forceLogout")
  public String forceLogout(@RequestParam(value = "ids") String[] ids) {

    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);
  }