Chat with your database (SQL, CSV, pandas, polars, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.
This pull request introduces a new endpoint to list users with access to a specific workspace and includes comprehensive integration tests for this functionality.
Adds a new endpoint: Implements a /workspaces/users endpoint in server/api/v1/workspaces/workspaces.py that fetches users associated with the current workspace. This is facilitated by a new method get_workspace_users in server/app/controllers/workspace.py, which queries the database for users with access to the given workspace.
Updates the UserRepository: Modifies server/app/repositories/user.py to include a new method get_users_by_workspace_id, enabling the fetching of users based on workspace access.
Integrates workspace router: Modifies server/api/v1/__init__.py to include a new router for workspace-related operations, ensuring the new users endpoint is correctly registered and accessible.
Includes comprehensive tests: Adds a new file tests/integration_tests/test_workspace_users.py that contains tests for the new endpoint, including edge cases like requesting users for a non-existent workspace.
This pull request introduces a new endpoint to list users with access to a specific workspace and includes comprehensive integration tests for this functionality.
/workspaces/users
endpoint inserver/api/v1/workspaces/workspaces.py
that fetches users associated with the current workspace. This is facilitated by a new methodget_workspace_users
inserver/app/controllers/workspace.py
, which queries the database for users with access to the given workspace.server/app/repositories/user.py
to include a new methodget_users_by_workspace_id
, enabling the fetching of users based on workspace access.server/api/v1/__init__.py
to include a new router for workspace-related operations, ensuring the new users endpoint is correctly registered and accessible.tests/integration_tests/test_workspace_users.py
that contains tests for the new endpoint, including edge cases like requesting users for a non-existent workspace.For more details, open the Copilot Workspace session.