Skip to content
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

Test and resolve issue with get_file and upload_file #1441

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

dokterbob
Copy link
Collaborator

Fixes #1101 and includes and closes #1438.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. backend Pertains to the Python backend. labels Oct 16, 2024
@dokterbob dokterbob enabled auto-merge (squash) October 16, 2024 15:50
@dokterbob dokterbob added security review-me Ready for review! labels Oct 16, 2024
@dokterbob dokterbob marked this pull request as draft October 16, 2024 16:43
auto-merge was automatically disabled October 16, 2024 16:43

Pull request was converted to draft

@dokterbob
Copy link
Collaborator Author

Converted back to draft, there's still an issue I'd like to work on.

@dokterbob dokterbob force-pushed the dokterbob/project_file_auth_tests branch 2 times, most recently from b4e6c34 to 1a60956 Compare October 16, 2024 17:23
@dokterbob dokterbob marked this pull request as ready for review October 16, 2024 17:23
@dosubot dosubot bot added the bug Something isn't working label Oct 16, 2024
@dokterbob dokterbob force-pushed the dokterbob/project_file_auth_tests branch from 1a60956 to 70f09d4 Compare October 17, 2024 11:16
@dokterbob dokterbob merged commit e65f191 into main Oct 17, 2024
15 checks passed
@dokterbob dokterbob deleted the dokterbob/project_file_auth_tests branch October 17, 2024 11:18
wenboown added a commit to wenboown/chainlit that referenced this pull request Oct 20, 2024
@wenboown
Copy link

The commit e65f19 prevents elements from showing when the oauth are not setup. For example, I am using the simple password example in https://docs.chainlit.io/authentication/password for development, and got 401 Unauthorized on the frontend.

Problem is in
@router.get("/project/file/{file_id}")

anyway to make it work for simple auth case as well? Thank you

dokterbob added a commit that referenced this pull request Oct 21, 2024
…#1441)

* Unit tests for `get_file` and `upload_file` endpoints, including authorization.
* Add auth to /project/file get endpoint by @qvalentin , closes #1101.

---------

Co-authored-by: qvalentin <[email protected]>
dokterbob added a commit that referenced this pull request Oct 22, 2024
…#1441)

* Unit tests for `get_file` and `upload_file` endpoints, including authorization.
* Add auth to /project/file get endpoint by @qvalentin , closes #1101.

---------

Co-authored-by: qvalentin <[email protected]>
@hayescode
Copy link
Contributor

The commit e65f19 prevents elements from showing when the oauth are not setup. For example, I am using the simple password example in https://docs.chainlit.io/authentication/password for development, and got 401 Unauthorized on the frontend.

Problem is in @router.get("/project/file/{file_id}")

anyway to make it work for simple auth case as well? Thank you

@dokterbob Please take a look at this. This PR causes Elements to break. #1472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Pertains to the Python backend. bug Something isn't working review-me Ready for review! security size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files not protected when auth is enabled
5 participants