fix(api): cast teamId to int in deployment authorization check

Ensure proper type comparison when verifying deployment team ownership.
Adds comprehensive feature tests for the GET /api/v1/deployments/{uuid} endpoint.
This commit is contained in:
Andras Bacsai
2026-03-12 13:25:10 +01:00
parent 709e5e882e
commit 3819676555
2 changed files with 95 additions and 1 deletions
@@ -128,7 +128,7 @@ class DeployController extends Controller
return response()->json(['message' => 'Deployment not found.'], 404);
}
$application = $deployment->application;
if (! $application || data_get($application->team(), 'id') !== $teamId) {
if (! $application || data_get($application->team(), 'id') !== (int) $teamId) {
return response()->json(['message' => 'Deployment not found.'], 404);
}