feat: enhance player authentication and agent management features
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
- Updated AGENTS.md to clarify player interface bindings and agent account restrictions. - Improved PlayerAuthLoginController to include captcha verification for player login. - Enhanced AdminPlayerIndexController with permission checks for admin users. - Refactored AdminPlayerStoreController to enforce agent node restrictions for non-super admins. - Introduced new error codes for player authentication failures and updated related services. - Enhanced validation rules for agent profiles to include settlement cycle options. - Improved AdminCaptchaService to support separate scopes for admin and player captcha handling. - Updated various services to ensure proper credit management and settlement processes.
This commit is contained in:
@@ -40,18 +40,7 @@ final class AgentNodeRoleStoreController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
if (! AdminAgentScope::nodeManageableBy($admin, $agent_node)) {
|
||||
return AdminAgentNodeAccess::denyUnlessCanManageParent($admin, $agent_node)
|
||||
?? ApiMessage::errorResponse(
|
||||
$request,
|
||||
'admin.agent_role_manage_denied',
|
||||
ErrorCode::AdminForbidden->value,
|
||||
null,
|
||||
403,
|
||||
);
|
||||
}
|
||||
|
||||
// Agent accounts can only create roles on their own node, not descendants
|
||||
// Agent accounts can only create roles on their own node, not descendants.
|
||||
$primaryNode = AdminAgentScope::primaryAgentNode($admin);
|
||||
if ($primaryNode !== null && (int) $primaryNode->id !== (int) $agent_node->id) {
|
||||
return ApiMessage::errorResponse(
|
||||
|
||||
Reference in New Issue
Block a user