/** * * * <pre> * 授权验证,必须在获取注入数据之后进行调用 * 1.验证数据签名 * 2.验证授权信息 * </pre> */ protected void authorizedtoVerify() { // 数据签名 ManagerBusinessUtils.checkManagerLoginlogSignature(getRequestUtil(), currentManagerLoginLog()); // 获取当前请求的权限信息 Permission permission = permissionService.loadPermissionByAction(request.getServletPath()); // 授权验证 ManagerBusinessUtils.checkAuthorize(currentManagerLoginLog().getManager(), permission); }
/** 获取当前的登陆日志信息 */ protected ManagerLoginLog currentManagerLoginLog() { if (managerLoginLog == null) { String accessId = getRequestUtil().getAccessID(); SystemBusinesUtils.checkAccessID(accessId); managerLoginLog = managerLoginLogService.loadByAccessID(accessId); ManagerBusinessUtils.checkManagerLoginLog(managerLoginLog); managerLoginLogService.activationManagerLoginLog(accessId); } return managerLoginLog; }