security: round 2 — multi-tenancy isolation (OrganisationScope, scoped validation, boundary checks)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -255,7 +255,7 @@ class EventTest extends TestCase
|
||||
|
||||
$response = $this->getJson("/api/v1/organisations/{$this->organisation->id}/events/{$event->id}");
|
||||
|
||||
$response->assertForbidden();
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
public function test_update_event_from_other_org_is_blocked(): void
|
||||
@@ -269,7 +269,7 @@ class EventTest extends TestCase
|
||||
'name' => 'Cross-org hack',
|
||||
]);
|
||||
|
||||
$response->assertForbidden();
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
// --- UNAUTHENTICATED ---
|
||||
@@ -370,7 +370,7 @@ class EventTest extends TestCase
|
||||
|
||||
$response = $this->deleteJson("/api/v1/organisations/{$this->organisation->id}/events/{$event->id}");
|
||||
|
||||
$response->assertForbidden();
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
public function test_soft_deleted_event_not_in_index(): void
|
||||
|
||||
Reference in New Issue
Block a user