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:
@@ -15,7 +15,15 @@ return [
|
||||
'permission_catalog_incomplete' => 'Permission catalog is incomplete (missing: :detail). Run migrate and admin-auth-sync.',
|
||||
'exceeds_parent' => 'Share rate cannot exceed the parent agent.',
|
||||
'exceeds_available' => 'Credit limit exceeds the parent\'s available allocation.',
|
||||
'exceeds_limit' => 'Default player rebate cannot exceed the rebate ceiling.',
|
||||
'exceeds_limit' => 'Value exceeds the allowed limit.',
|
||||
'exceeds_player_rebate_limit' => 'Rebate rate cannot exceed the agent rebate ceiling.',
|
||||
'exceeds_parent_rebate' => 'Rebate ceiling cannot exceed the parent agent.',
|
||||
'exceeds_default_rebate_limit' => 'Default player rebate cannot exceed this node\'s rebate ceiling.',
|
||||
'not_allowed' => 'This capability is not enabled for the agent.',
|
||||
'agent_profile_required' => 'Configure share rate and credit on the agent profile first.',
|
||||
'parent_profile_required' => 'Configure share rate and credit on the parent agent profile first.',
|
||||
'wallet_player_prohibited' => 'Wallet players cannot have credit limits or rebate settings.',
|
||||
'exceeds_unpaid' => 'Payment amount cannot exceed the unpaid balance on this bill.',
|
||||
'invalid_range' => 'Share rate must be between 0 and 100.',
|
||||
'below_allocated' => 'Credit limit cannot be lower than credit already allocated to sub-agents.',
|
||||
'parent_cannot_delegate' => 'The parent has not enabled this capability.',
|
||||
@@ -31,4 +39,17 @@ return [
|
||||
'period_not_found' => 'Settlement period not found or not accessible.',
|
||||
'period_already_closed' => 'This period is already closed.',
|
||||
'share_snapshot_missing' => 'Some ledger rows are missing share snapshots. Complete draw settlement first.',
|
||||
'completed' => 'This settlement period is closed; bills and payments cannot be changed.',
|
||||
'locked' => 'This bill is locked and cannot be modified.',
|
||||
'not_payable' => 'This bill cannot accept payments in its current status. Confirm it first.',
|
||||
'not_confirmable' => 'This bill cannot be confirmed in its current status.',
|
||||
'not_eligible' => 'This bill is not eligible for this operation.',
|
||||
'no_unpaid' => 'This bill has no unpaid balance.',
|
||||
'not_locked' => 'This bill is not confirmed/locked yet; adjustments are not allowed.',
|
||||
'zero' => 'Amount cannot be zero.',
|
||||
'insufficient' => 'Insufficient available credit. Reduce the stake or ask your agent for a higher limit.',
|
||||
'overdue' => 'You have overdue bills. Settle them before continuing.',
|
||||
'invalid' => 'Invalid value. Please check and try again.',
|
||||
'bill_not_found' => 'Settlement bill not found or not accessible.',
|
||||
'exists' => 'The selected site does not exist or is not integrated.',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user