Skip to content

Commit

Permalink
Do not validate storage of emulated Rejection Notes against configur…
Browse files Browse the repository at this point in the history
…ed Store Permission Service fix #4299
  • Loading branch information
gunterze committed Nov 29, 2023
1 parent 8073a87 commit dd53e29
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public int reject(ApplicationEntity ae, String aet, String studyIUID, String ser
String changeRequesterAET = ae.getAEExtension(ArchiveAEExtension.class).changeRequesterAET();
StoreSession storeSession = storeService.newStoreSession(httpRequest, ae, aet,
changeRequesterAET != null ? changeRequesterAET : ae.getAETitle());
storeSession.setSkipStorePermission(true);
String rejectionNoteObjectStorageID = rejectionNoteObjectStorageID(storeSession);
storeSession.withObjectStorageID(rejectionNoteObjectStorageID);
storeService.restoreInstances(storeSession, studyIUID, seriesIUID, null, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,8 @@ public interface StoreSession extends Closeable {
String getImpaxReportEndpoint();

void setImpaxReportEndpoint(String impaxReportEndpoint);

boolean isSkipStorePermission();

void setSkipStorePermission(boolean skipStorePermission);
}
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,7 @@ private String objectStorageID(StoreContext ctx) {

private void checkStorePermission(StoreContext ctx, Patient pat) throws DicomServiceException {
StoreSession session = ctx.getStoreSession();
if (session.isSkipStorePermission()) return;
String serviceURL = session.getArchiveAEExtension().storePermissionServiceURL();
if (serviceURL == null) {
emulateStorePermissionResponse(ctx, pat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class StoreSessionImpl implements StoreSession {
private Attributes.UpdatePolicy patientUpdatePolicy;
private Attributes.UpdatePolicy studyUpdatePolicy;
private String impaxReportEndpoint;
boolean skipStorePermission;

StoreSessionImpl(StoreService storeService) {
this.serialNo = prevSerialNo.incrementAndGet();
Expand Down Expand Up @@ -406,4 +407,15 @@ public String getImpaxReportEndpoint() {
public void setImpaxReportEndpoint(String impaxReportEndpoint) {
this.impaxReportEndpoint = impaxReportEndpoint;
}

@Override
public boolean isSkipStorePermission() {
return skipStorePermission;
}

@Override
public void setSkipStorePermission(boolean skipStorePermission) {
this.skipStorePermission = skipStorePermission;
}

}

0 comments on commit dd53e29

Please sign in to comment.