- 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.
64 lines
5.6 KiB
PHP
64 lines
5.6 KiB
PHP
<?php
|
|
|
|
return [
|
|
'unauthenticated' => 'Unauthenticated or session expired.',
|
|
'invalid_captcha' => 'Invalid or expired captcha.',
|
|
'invalid_credentials' => 'Invalid account or password.',
|
|
'account_disabled' => 'This account has been disabled.',
|
|
'permission_denied' => 'You do not have permission to perform this action.',
|
|
'forbidden' => 'You do not have permission to perform this action.',
|
|
'settlement_run_skipped' => 'Settlement was not run for this draw (check draw status and published result batch).',
|
|
'site_access_denied' => 'You do not have access to this site.',
|
|
'site_rotate_denied' => 'You cannot rotate secrets for this site.',
|
|
'site_update_denied' => 'You cannot modify this site.',
|
|
'site_delete_denied' => 'You cannot delete this site.',
|
|
'integration_site_default_delete_denied' => 'The default site cannot be deleted.',
|
|
'integration_site_last_delete_denied' => 'At least one integration site must remain; the last site cannot be deleted.',
|
|
'no_integration_site' => 'Create an integration site first.',
|
|
'site_player_access_denied' => 'You do not have access to players under this site.',
|
|
'player_create_site_forbidden' => 'You cannot create players under this site.',
|
|
'player_create_agent_required' => 'A player must belong to an agent node. Choose a valid site with an agent root, or sign in with an agent-bound account.',
|
|
'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.',
|
|
'platform_roles_fixed' => 'Only the built-in Super Admin and Agent platform roles are supported; creating new roles is disabled.',
|
|
'role_super_admin_permissions_fixed' => 'Super Admin always has full permissions. Run lottery:admin-auth-sync after the permission catalog changes.',
|
|
'role_super_admin_metadata_fixed' => 'Super Admin is a built-in role; name and status cannot be changed.',
|
|
'role_builtin_cannot_delete' => 'Built-in roles cannot be deleted.',
|
|
'role_has_users_cannot_delete' => 'This role still has assigned admins and cannot be deleted.',
|
|
'agent_root_delete_denied' => 'Root agent nodes cannot be deleted.',
|
|
'agent_node_has_children_cannot_delete' => 'This agent node has child nodes. Delete children first.',
|
|
'agent_node_has_players_cannot_delete' => 'This agent node still has players. Reassign or remove them before deleting the agent.',
|
|
'agent_node_has_users_cannot_delete' => 'This agent node still has bound admin accounts and cannot be deleted.',
|
|
'agent_node_has_roles_cannot_delete' => 'This agent node still has bound roles and cannot be deleted.',
|
|
'agent_role_in_use' => 'This role is still assigned to :count account(s). Unbind them in Accounts before deleting.',
|
|
'agent_role_read_only' => 'Read-only template roles cannot be changed or deleted.',
|
|
'agent_account_managed_in_agents' => 'Agent accounts must be managed in Agent Operations, not in the platform accounts page.',
|
|
'agent_role_managed_in_agents' => 'Agent roles must be managed in Agent Operations, not in the platform roles page.',
|
|
'system_roles_only' => 'Platform accounts can only be assigned platform roles.',
|
|
'user_cannot_delete_self' => 'Cannot delete your own account.',
|
|
'user_cannot_delete_last_super_admin' => 'Cannot delete the last super admin.',
|
|
'super_admin_only_for_roles' => 'Only super admins can manage roles.',
|
|
'super_admin_not_site_role' => 'Super admin is a single platform account and cannot be assigned as a site role.',
|
|
'route_name_missing_for_permission' => 'Admin route is missing a route name for permission checks.',
|
|
'api_resource_not_configured' => 'Admin API resource is not configured: :route',
|
|
'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.',
|
|
];
|