fix: isolate registered project folders by tenant

This commit is contained in:
Hamza Ayed
2026-10-04 02:04:14 +03:00
parent 1feeb372a4
commit 5ab7ec2713
4 changed files with 58 additions and 3 deletions
+10
View File
@@ -309,6 +309,11 @@ class AuthenticationTests(unittest.TestCase):
headers={"Authorization": f"Bearer {first_token}"},
json={"workspace_path": str(second_root)},
)
first_overlapping_registration = self.client.post(
"/v1/agent/projects",
headers={"Authorization": f"Bearer {first_token}"},
json={"workspace_path": str(parent)},
)
second_own = self.client.post(
"/v1/agent/workspace/files",
headers={"Authorization": f"Bearer {second_token}"},
@@ -317,6 +322,11 @@ class AuthenticationTests(unittest.TestCase):
self.assertEqual(first_own.status_code, 200, first_own.text)
self.assertEqual(first_own.json()["files"], ["one.md"])
self.assertEqual(first_other.status_code, 403, first_other.text)
self.assertEqual(
first_overlapping_registration.status_code,
409,
first_overlapping_registration.text,
)
self.assertEqual(second_own.status_code, 200, second_own.text)
self.assertEqual(second_own.json()["files"], ["two.md"])