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 committed 2026-03-12 13:25:10 +01:00
1 parent 709e5e882e
commit 3819676555
2 files changed
+95 -1

No files matched your search

@@ -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);
}