Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed

- API sort extension tests [#264](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/264)
- Basic auth permission fix for checking route path instead of absolute path [#266](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/266)

## [v3.0.0a1]

Expand Down
2 changes: 1 addition & 1 deletion stac_fastapi/core/stac_fastapi/core/basic_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def has_access(
)

permissions = user.get("permissions", [])
path = request.url.path
path = request.scope.get("route").path
method = request.method

if permissions == "*":
Expand Down
2 changes: 1 addition & 1 deletion stac_fastapi/tests/basic_auth/test_basic_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def test_delete_resource_insufficient_permissions(app_client_basic_auth, c

assert response.status_code == 403
assert response.json() == {
"detail": "Insufficient permissions for [DELETE /collections/test-collection]"
"detail": "Insufficient permissions for [DELETE /collections/{collection_id}]"
}


Expand Down