Skip to content

Commit

Permalink
Fix an issue searching for annotation metadata
Browse files Browse the repository at this point in the history
If a user has permission to view an annotation but not the item, a 403
was percolated to the UI
  • Loading branch information
manthey committed Nov 12, 2024
1 parent ef26bcb commit 6b135be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

- Openslide now requires the binary wheel on appropriate platforms ([#1709](../../pull/1709), [#1710](../../pull/1710))

### Bug Fixes

- Fix an issue searching for annotation metadata on items that a user doesn't have permissions to view ([#1723](../../pull/1723))

## 1.30.2

### Features
Expand Down
7 changes: 6 additions & 1 deletion girder/girder_large_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,12 @@ def metadataSearchHandler( # noqa
if id in foundIds:
continue
foundIds.add(id)
entry = resultModelInst.load(id=id, user=user, level=level, exc=False)
try:
entry = resultModelInst.load(id=id, user=user, level=level, exc=False)
except Exception:

Check warning on line 433 in girder/girder_large_image/__init__.py

View check run for this annotation

Codecov / codecov/patch

girder/girder_large_image/__init__.py#L433

Added line #L433 was not covered by tests
# We might have permission to view an annotation but not
# the item
continue

Check warning on line 436 in girder/girder_large_image/__init__.py

View check run for this annotation

Codecov / codecov/patch

girder/girder_large_image/__init__.py#L436

Added line #L436 was not covered by tests
if entry is not None and offset:
offset -= 1
continue
Expand Down

0 comments on commit 6b135be

Please sign in to comment.