feat: enhance admin role management and reconciliation features
- Updated AGENTS.md to clarify site admin roles and their associated permissions. - Refactored reconciliation controllers to include admin user validation and improved access control based on admin roles. - Enhanced AdminReconcileJobService to support player-specific reconciliation and site-based job creation. - Removed deprecated rebate commission report functionality from the API and related services. - Improved dashboard overview builders to accommodate new site operator roles and their specific functionalities.
This commit is contained in:
@@ -1,13 +1,44 @@
|
||||
<?php
|
||||
|
||||
use App\Support\SiteAdminDefaultRolePermissions;
|
||||
use App\Support\SiteCsDefaultRolePermissions;
|
||||
use App\Support\SiteFinanceDefaultRolePermissions;
|
||||
|
||||
test('site admin template includes dashboard and settlement manage', function (): void {
|
||||
test('site admin template includes draw view export and excludes integration and wallet adjust', function (): void {
|
||||
$slugs = SiteAdminDefaultRolePermissions::templateSlugs();
|
||||
|
||||
expect($slugs)
|
||||
->toContain('prd.dashboard.view')
|
||||
->toContain('prd.agent.manage')
|
||||
->toContain('prd.settlement.agent.manage')
|
||||
->toContain('prd.report.view');
|
||||
->toContain('prd.report.view')
|
||||
->toContain('prd.report.export')
|
||||
->toContain('prd.draw_result.view')
|
||||
->toContain('prd.wallet_reconcile.manage')
|
||||
->not->toContain('prd.integration.view')
|
||||
->not->toContain('prd.wallet_adjust.manage');
|
||||
});
|
||||
|
||||
test('site finance template focuses on reconcile reports and settlement without agent manage', function (): void {
|
||||
$slugs = SiteFinanceDefaultRolePermissions::templateSlugs();
|
||||
|
||||
expect($slugs)
|
||||
->toContain('prd.report.export')
|
||||
->toContain('prd.wallet_adjust.manage')
|
||||
->toContain('prd.settlement.agent.manage')
|
||||
->toContain('prd.draw_result.view')
|
||||
->not->toContain('prd.agent.manage')
|
||||
->not->toContain('prd.users.manage');
|
||||
});
|
||||
|
||||
test('site cs template is single-player scoped without global reports', function (): void {
|
||||
$slugs = SiteCsDefaultRolePermissions::templateSlugs();
|
||||
|
||||
expect($slugs)
|
||||
->toContain('prd.dashboard.view')
|
||||
->toContain('prd.users.view_cs')
|
||||
->toContain('prd.tickets.view')
|
||||
->toContain('prd.wallet_reconcile.view_cs')
|
||||
->not->toContain('prd.report.view')
|
||||
->not->toContain('prd.agent.view');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user