feat: 完成分享、单会话与发布审批改造

- 增加工作流协作分享与知识库卡片分享入口,统一低版本浏览器复制反馈

- Web 新登录替换旧会话,并保持 API Key 会话隔离

- 发布审批增加必填说明并在审批详情展示

- 账号重置与导入改用可配置默认强密码
This commit is contained in:
2026-07-23 16:09:31 +08:00
parent caa1f07b66
commit 5a42826d44
71 changed files with 3191 additions and 132 deletions

View File

@@ -0,0 +1,45 @@
package tech.easyflow.system.config;
import org.junit.Assert;
import org.junit.Test;
import tech.easyflow.common.web.exceptions.BusinessException;
/**
* {@link AccountSecurityProperties} 测试。
*/
public class AccountSecurityPropertiesTest {
/**
* 验证默认重置密码符合强密码策略。
*/
@Test
public void shouldAcceptDefaultStrongResetPassword() {
AccountSecurityProperties properties = new AccountSecurityProperties();
properties.afterPropertiesSet();
Assert.assertEquals("!QAZ2wsx", properties.getDefaultResetPassword());
}
/**
* 验证弱默认密码会阻止应用启动。
*/
@Test(expected = BusinessException.class)
public void shouldRejectWeakResetPassword() {
AccountSecurityProperties properties = new AccountSecurityProperties();
properties.setDefaultResetPassword("123456");
properties.afterPropertiesSet();
}
/**
* 验证空默认密码会阻止应用启动。
*/
@Test(expected = BusinessException.class)
public void shouldRejectBlankResetPassword() {
AccountSecurityProperties properties = new AccountSecurityProperties();
properties.setDefaultResetPassword(" ");
properties.afterPropertiesSet();
}
}