mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 16:15:17 +00:00
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:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user