修改权限逻辑

This commit is contained in:
lcj
2025-09-15 10:57:19 +08:00
parent 1bc2743dc7
commit 70537f34c4
137 changed files with 5988 additions and 426 deletions

View File

@ -45,7 +45,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
* token 控制
@ -99,11 +98,6 @@ public class TokenController {
sysLoginService.checkTenant(loginBody.getTenantId());
// 登录
LoginVo loginVo = IAuthStrategy.login(body, clientVo, grantType);
Long userId = LoginHelper.getUserId();
scheduledExecutorService.schedule(() -> {
remoteMessageService.publishMessage(List.of(userId), "欢迎登录RuoYi-Cloud-Plus微服务管理系统");
}, 5, TimeUnit.SECONDS);
return R.ok(loginVo);
}

View File

@ -137,7 +137,12 @@ public class SysLoginService {
String password = registerBody.getPassword();
// 校验用户类型是否存在
String userType = UserType.getUserType(registerBody.getUserType()).getUserType();
// 校验密码是否符合要求
String pattern = "^(?!.*\\s)(?!^[a-zA-Z]+$)(?!^[0-9]+$)(?!^[^a-zA-Z0-9]+$)(?!^[a-zA-Z0-9]+$).{8,18}$";
boolean isValid = password.matches(pattern);
if (!isValid) {
throw new UserException("注册失败密码需满足818位包含大小写字母、数字、特殊字符中的至少三种组合");
}
boolean captchaEnabled = captchaProperties.getEnabled();
// 验证码开关
if (captchaEnabled) {

View File

@ -1,8 +1,8 @@
package org.dromara.auth.service.impl;
import cn.hutool.crypto.digest.BCrypt;
import cn.dev33.satoken.stp.StpUtil;
import cn.dev33.satoken.stp.parameter.SaLoginParameter;
import cn.hutool.crypto.digest.BCrypt;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
@ -23,6 +23,7 @@ import org.dromara.common.json.utils.JsonUtils;
import org.dromara.common.redis.utils.RedisUtils;
import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.common.tenant.helper.TenantHelper;
import org.dromara.system.api.RemoteProjectService;
import org.dromara.system.api.RemoteUserService;
import org.dromara.system.api.domain.vo.RemoteClientVo;
import org.dromara.system.api.model.LoginUser;
@ -45,6 +46,9 @@ public class PasswordAuthStrategy implements IAuthStrategy {
@DubboReference
private RemoteUserService remoteUserService;
@DubboReference
private RemoteProjectService remoteProjectService;
@Override
public LoginVo login(String body, RemoteClientVo client) {
PasswordLoginBody loginBody = JsonUtils.parseObject(body, PasswordLoginBody.class);

View File

@ -1,6 +1,6 @@
# Tomcat
server:
port: 9210
port: 19210
# Spring
spring: