feat(admin): 统一后台 API 资源鉴权并完善投注风控快照与回补

This commit is contained in:
2026-05-19 09:11:50 +08:00
parent 6ef41cee76
commit 4cf561cd57
26 changed files with 1079 additions and 36 deletions

View File

@@ -69,6 +69,28 @@ php artisan schedule:work
只做 HTTP / 降级轮询、不测 WebSocket 时:**终端 2、3 可先不开**;要完整大厅 WS**三项都开**
## 后台权限体检
后台权限现在提供了一条可直接接入 CI 的体检命令,用来检查:
- 受保护后台路由是否都已登记到 `admin_api_resources`
- `permission_required` 资源是否已绑定 `admin_api_resource_bindings`
- `admin_role_menu_actions``admin_role_api_resources` 是否漂移
本地可直接执行:
```bash
php artisan lottery:admin-auth-audit
```
或通过 Composer 脚本执行:
```bash
composer test:admin-auth
```
如果后续接 GitHub Actions、GitLab CI 或其他流水线,直接复用 `composer test:admin-auth` 即可。
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).