fix: 绑定集成测试并收紧审批接口鉴权

This commit is contained in:
2026-10-30 18:35:54 +08:00
parent 9f5f38575a
commit a103bc5761
22 changed files with 12 additions and 0 deletions
+8
View File
@@ -389,6 +389,14 @@
<configuration>
<skipITs>${skipITs}</skipITs>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
@@ -61,6 +61,7 @@ public class MybatisPlusConfig {
}
}
// return getLoginUserTenantId();
// 兜底租户:仅供未携带 TenantId/Domain 头的内部调用;审批请求必须由客户端显式携带租户头。
return new LongValue(10150);
}
@@ -35,6 +35,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
http.authorizeRequests()
.antMatchers(HttpMethod.OPTIONS, "/**")
.permitAll()
// 审批接口必须登录;方法级 @PreAuthorize 再校验具体权限
.antMatchers("/api/approval/**")
.authenticated()
.antMatchers(HttpMethod.GET, "/api/file/**","/**", "/api/captcha", "/")
.permitAll()
.antMatchers(