-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow superuser to delete any document #1719
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 4d5c922 in 1 minute and 45 seconds
More details
- Looked at
799
lines of code in12
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. js/sdk/__tests__/DocumentsAndCollectionsIntegrationUser.test.ts:216
- Draft comment:
The test for listing user 2's document chunks expects a 404 error, which is inconsistent with the test for user 1's document chunks that expects a 403 error. Ensure the expected status codes are consistent and correct. - Reason this comment was not posted:
Comment did not seem useful.
2. js/sdk/__tests__/DocumentsAndCollectionsIntegrationUser.test.ts:222
- Draft comment:
The test for user 1 deleting user 2's document expects a 404 error, which is inconsistent with the test for user 2 deleting user 1's document that expects a 403 error. Ensure the expected status codes are consistent and correct. - Reason this comment was not posted:
Marked as duplicate.
3. py/sdk/v3/conversations.py:106
- Draft comment:
Consider using PATCH instead of POST for updating resources to adhere to RESTful practices.
"PATCH",
- Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_H3VdoE6dR5L5zxG5
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
}); | ||
expect(response.results).toBeDefined(); | ||
expect(response.results.name).toBe("Updated Name"); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a check to ensure the conversation ID is correct after updating the name.
}); | |
expect(response.results.id).toBe(conversationId); |
name: options.name, | ||
}; | ||
|
||
return this.client.makeRequest("POST", `conversations/${options.id}`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using PATCH instead of POST for updating resources to adhere to RESTful practices.
return this.client.makeRequest("POST", `conversations/${options.id}`, { | |
return this.client.makeRequest("PATCH", `conversations/${options.id}`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 9e4702a in 29 seconds
More details
- Looked at
22
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. js/sdk/__tests__/DocumentsAndCollectionsIntegrationUser.test.ts:213
- Draft comment:
The status code for unauthorized document chunk listing should be consistent. Consider using 404 for both cases or 403, depending on the intended behavior. This inconsistency is also present in the document deletion tests on lines 219 and 225. - Reason this comment was not posted:
Comment looked like it was already resolved.
Workflow ID: wflow_ZLlACMfrouq7xkb7
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Enable superusers to delete any document, update related tests, and refine API and database handling for document management.
DocumentsAndCollectionsIntegrationUser.test.ts
.delete_document_by_id
indocuments_router.py
to allow superuser deletions without owner checks.ConversationsIntegrationSuperUser.test.ts
.delete_documents_and_chunks_by_filter
inmanagement_service.py
now supports superuser deletions.create_conversation
andupdate_conversation
inconversations.py
handle exceptions more robustly.GraphsIntegrationSuperUser.test.ts
to 60000ms.async_client.py
andbase_client.py
.This description was created by for 9e4702a. It will automatically update as commits are pushed.