Files
lotteryLaravel/tests/Unit/SiteAdminDefaultRolePermissionsTest.php
kang 395e1c7400 feat: refactor super admin to use is_super_admin flag and enhance site deletion logic
- Changed super admin detection from role-based to `is_super_admin` flag in AdminUser model
- Added `requireDefaultAdminSiteId()` method to throw validation error when no integration site exists
- Enhanced site deletion to migrate platform role bindings to fallback site and auto-delete site-specific admin accounts
- Made agent line code optional with auto-generation fallback using `{site_code}-agent-{counter}` format
2026-06-12 20:47:40 +08:00

14 lines
406 B
PHP

<?php
use App\Support\SiteAdminDefaultRolePermissions;
test('site admin template includes dashboard and settlement manage', function (): void {
$slugs = SiteAdminDefaultRolePermissions::templateSlugs();
expect($slugs)
->toContain('prd.dashboard.view')
->toContain('prd.agent.manage')
->toContain('prd.settlement.agent.manage')
->toContain('prd.report.view');
});