perf: reuse authorized chat snapshot when reading history
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
from conftest import check, headers
|
||||
|
||||
|
||||
def test_history_acl_precedes_query_validation(client, actors, chat):
|
||||
path = f"/api/v1/chats/{chat['id']}/messages"
|
||||
check(
|
||||
client.get(
|
||||
path,
|
||||
headers=headers(actors[2]),
|
||||
params={"limit": 0, "cursor": "broken"},
|
||||
),
|
||||
404,
|
||||
"Error",
|
||||
)
|
||||
check(
|
||||
client.get(
|
||||
path,
|
||||
headers=headers(actors[0]),
|
||||
params={"limit": 0, "cursor": "broken"},
|
||||
),
|
||||
400,
|
||||
"Error",
|
||||
)
|
||||
Reference in New Issue
Block a user