activeloopai / deeplake

Database for AI. Store Vectors, Images, Texts, Videos, etc. Use with LLMs/LangChain. Store, query, version, & visualize any AI data. Stream data in real-time to PyTorch/TensorFlow. https://activeloop.ai
https://activeloop.ai
Mozilla Public License 2.0
7.88k stars 607 forks source link

Avoid making http requests to validate unauthenticated users #2810

Closed nvoxland-al closed 3 months ago

nvoxland-al commented 3 months ago

🚀 🚀 Pull Request

Impact

Description

If a user has no token, there is no need to make the API call to /api/user/profile. We can just know their organization is "public" without making the call.

Things to be aware of

get_user_organizations() is the only use of /api/user/profile

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes are missing coverage. Please review. Files Patch % Lines
deeplake/client/auth/auth_context.py 66.66% 1 Missing :warning:
deeplake/client/auth/azure.py 50.00% 1 Missing :warning:

:loudspeaker: Thoughts on this report? Let us know!

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
77.8% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud