Skip to content

Commit

Permalink
Merge pull request #1347 from girder/add-scope
Browse files Browse the repository at this point in the history
Add scope to the dicomweb import endpoint access decorator.
  • Loading branch information
manthey authored Oct 18, 2023
2 parents a468819 + 4f0639d commit 6560a32
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
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

0 comments on commit 6560a32

Please sign in to comment.