fix: isolate registered project folders by tenant
This commit is contained in:
@@ -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"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user