Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scope to the dicomweb import endpoint access decorator. #1347

Merged
merged 1 commit into from
Oct 18, 2023
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
- Improve tifffile associated image detection ([#1333](../../pull/1333))
- Guard against throwing a javascript warning ([#1337](../../pull/1337))
- Test on Python 3.12 ([#1335](../../pull/1335))
- Added filtering and limit options to the DICOMweb assetstore ([#1327](../../pull/1327))

### Changes
- Prohibit bioformats and vips from reading mrxs directly ([#1328](../../pull/1328))
- Handle Python 3.12 deprecating utcnow ([#1331](../../pull/1331))
- Turn down logging about annotation ACLs ([#1332](../../pull/1332))
- Add scope to the dicomweb import endpoint access decorator ([#1347](../../pull/1347))

## 1.25.0

Expand Down
2 changes: 0 additions & 2 deletions sources/dicom/large_image_source_dicom/assetstore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from girder import events
from girder.api import access
from girder.api.v1.assetstore import Assetstore as AssetstoreResource
from girder.constants import AssetstoreType
from girder.models.assetstore import Assetstore
Expand All @@ -15,7 +14,6 @@
]


@access.admin
def createAssetstore(event):
"""
When an assetstore is created, make sure it has a well-formed DICOMweb
Expand Down
3 changes: 2 additions & 1 deletion sources/dicom/large_image_source_dicom/assetstore/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from girder.api import access
from girder.api.describe import Description, describeRoute
from girder.api.rest import Resource, loadmodel
from girder.constants import TokenScope
from girder.exceptions import RestException
from girder.utility import assetstore_utilities
from girder.utility.model_importer import ModelImporter
Expand Down Expand Up @@ -74,7 +75,7 @@ def _importData(self, assetstore, params):
msg = 'No DICOM objects matching the search filters were found'
raise RestException(msg)

@access.admin
@access.admin(scope=TokenScope.DATA_WRITE)
@loadmodel(model='assetstore')
@describeRoute(
Description('Import references to DICOM objects from a DICOMweb server')
Expand Down