Skip to content

Commit

Permalink
[ENH]: Missing authz resource attribute extraction to `list_collectio…
Browse files Browse the repository at this point in the history
…ns` (#1328)

## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Added a missing attribute extraction required for list_collections to
properly be authorized

## Test plan
*How are these changes tested?*

- [x] Tests pass locally with `pytest` for python

## Documentation Changes
N/A
  • Loading branch information
tazarov authored Nov 7, 2023
1 parent cdcafc8 commit 8a5f3f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chromadb/server/fastapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ def get_tenant(self, tenant: str) -> Tenant:
resource=DynamicAuthzResource(
id="*",
type=AuthzResourceTypes.DB,
attributes=AuthzDynamicParams.dict_from_function_kwargs(
arg_names=["tenant", "database"]
),
),
)
def list_collections(
Expand Down

0 comments on commit 8a5f3f1

Please sign in to comment.