Compare commits

...

3 commits

Author SHA1 Message Date
RB
08b010d3de lang 2024-09-18 16:47:51 +08:00
RB
6979faf68f Update @rbv 2024-09-18 15:42:20 +08:00
RB
6ce7d8287b be: 企微登录逻辑 2024-09-18 14:56:21 +08:00
3 changed files with 18 additions and 15 deletions

2
@rbv

@ -1 +1 @@
Subproject commit 845bc4e533517c0503873b9355f94f0ca1f01c06
Subproject commit 21a7b1bbc528c52b570f41ed6d0528f7c4a3e5ef

View file

@ -58,21 +58,21 @@ public class LoginController extends LoginAction {
@GetMapping("login")
public ModelAndView checkLogin(HttpServletRequest request, HttpServletResponse response) throws IOException {
final String homeUrl = "../dashboard/home";
String nexturl = getParameter(request, "nexturl", homeUrl);
if (nexturl.startsWith("http")) nexturl = homeUrl;
// 直接登录
if (AppUtils.getRequestUser(request) != null) {
response.sendRedirect(homeUrl);
response.sendRedirect(nexturl);
return null;
}
// Token 登录
// TOKEN 登录
final String useToken = getParameter(request, "token");
if (StringUtils.isNotBlank(useToken)) {
ID tokenUser = AuthTokenManager.verifyToken(useToken, true, false);
if (tokenUser != null) {
loginSuccessed(request, response, tokenUser, false);
String nexturl = getParameter(request, "nexturl", homeUrl);
if (nexturl.startsWith("http")) nexturl = homeUrl;
response.sendRedirect(CodecUtils.urlDecode(nexturl));
return null;
} else {
@ -88,13 +88,7 @@ public class LoginController extends LoginAction {
if (altUser != null && UserHelper.isActive(altUser)) {
Integer ed = loginSuccessed(request, response, altUser, true);
String nexturl = getParameter(request, "nexturl", homeUrl);
if (nexturl.startsWith("http")) nexturl = homeUrl;
if (ed != null) {
nexturl = "../settings/passwd-expired?d=" + ed;
}
if (ed != null) nexturl = "../settings/passwd-expired?d=" + ed;
response.sendRedirect(CodecUtils.urlDecode(nexturl));
return null;

View file

@ -3238,5 +3238,14 @@
"首次使用?强烈建议阅读 [5分钟快速上手](https://getrebuild.com/learn/quick-start)":"首次使用?强烈建议阅读 [5分钟快速上手](https://getrebuild.com/learn/quick-start)",
"启用加锁模式":"启用加锁模式",
"禁用级联执行":"禁用级联执行",
"展开编辑":"展开编辑"
"展开编辑":"展开编辑",
"更新当前记录,将导出的报表作为附件保存":"更新当前记录,将导出的报表作为附件保存",
"禁用将导致超级管理员无法登录":"禁用将导致超级管理员无法登录",
"允许撤回、撤销审批":"允许撤回、撤销审批",
"新建一条记录,将导出的报表作为附件保存":"新建一条记录,将导出的报表作为附件保存",
"执行日期":"执行日期",
"并新建记录":"并新建记录",
"更新记录":"更新记录",
"并更新记录":"并更新记录",
"请选择附件字段":"请选择附件字段"
}