feat: enhance agent management and validation logic

- Updated AGENTS.md to clarify agent account restrictions and permissions.
- Implemented checks in AgentNodeAdminUserStoreController and AgentNodeRoleStoreController to restrict admin user and role creation to the agent's own node.
- Enhanced validation in AdminPlayerStoreController and AdminPlayerUpdateController to enforce credit limit and rebate rate rules based on player funding mode.
- Refactored various request classes to utilize shared admin account field rules for consistency.
- Improved error handling in services related to credit allocation and rebate limits to ensure proper validation and messaging.
This commit is contained in:
2026-06-14 21:13:27 +08:00
parent 395e1c7400
commit 5b6d4cb74d
56 changed files with 1558 additions and 222 deletions

View File

@@ -21,7 +21,11 @@ return [
'player_create_agent_forbidden' => 'You cannot assign the player to this agent node.',
'player_create_capability_forbidden' => 'This agent account is not allowed to create players. Ask your upline to enable the capability.',
'player_already_registered' => 'This main-site player is already registered.',
'player_site_player_id_required' => 'Main-site player ID is required.',
'player_native_username_required' => 'Lottery login username is required.',
'player_username_taken' => 'This login username is already taken.',
'player_wallet_balance_blocks_delete' => 'Player wallet still has balance. Clear it before deletion.',
'player_credit_in_use_blocks_delete' => 'Player still has allocated credit. Settle or release it before deletion.',
'player_has_tickets_blocks_delete' => 'Player has ticket records and cannot be deleted.',
'player_unpaid_settlement_blocks_delete' => 'Player still has unpaid settlement bills and cannot be deleted until they are settled or written off.',
'role_cannot_delete_super_admin' => 'Cannot delete the super admin role.',
@@ -49,4 +53,11 @@ return [
'api_resource_no_permission_binding' => 'Admin API resource has no permission binding: :code',
'currency_default_cannot_delete' => 'Default currency cannot be deleted.',
'currency_referenced_cannot_delete' => 'Currency is referenced by business data and cannot be deleted: :refs',
'agent_cannot_operate_bill' => 'You are not allowed to operate on this bill.',
'agent_cannot_operate_player_bill' => 'You may only record payments for direct players under your node.',
'agent_bound_cannot_manage_periods' => 'Bound agent accounts cannot open or close settlement periods. Contact site finance.',
'agent_bound_cannot_finance_adjust' => 'Bound agent accounts cannot write off bad debt or post finance adjustments. Contact site finance.',
'agent_cannot_view_platform_pnl' => 'Agent accounts cannot view platform-wide P&L reports.',
'admin_site_id_required' => 'Integration site is required.',
'admin_site_not_found' => 'Integration site not found or not accessible.',
];