Skip to content

Commit

Permalink
🔥Hotfix🔥 Release 5.1.1: Fix ACL issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaiter committed Oct 18, 2021
1 parent 2121a35 commit 12768fa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.1.1] - 2021-10-18
### Fixed
- Fixed ACL check in `ImageServiceImpl` that did not pass the HTTP request to the security backend

## [5.1.0] - 2021-10-15
### Added
- New API in [`ImageSecurityService`][api-image] and [`PresentationSecurityService`][api-presentation]
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>de.digitalcollections</groupId>
<artifactId>iiif-server-hymir</artifactId>
<version>5.1.1-SNAPSHOT</version>
<version>5.1.1</version>
<packaging>jar</packaging>

<url>https://github.com/dbmdz/iiif-server-hymir</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ private void enrichInfo(
/** Try to obtain a {@link ImageReader} for a given identifier */
private ImageReader getReader(String identifier)
throws ResourceNotFoundException, UnsupportedFormatException, IOException {
if (imageSecurityService != null && !imageSecurityService.isAccessAllowed(identifier, currentRequest)) {
if (imageSecurityService != null
&& !imageSecurityService.isAccessAllowed(identifier, currentRequest)) {
throw new ResourceNotFoundException();
}
FileResource fileResource;
Expand Down Expand Up @@ -429,7 +430,8 @@ public void processImage(

@Override
public Instant getImageModificationDate(String identifier) throws ResourceNotFoundException {
if (imageSecurityService != null && !imageSecurityService.isAccessAllowed(identifier)) {
if (imageSecurityService != null
&& !imageSecurityService.isAccessAllowed(identifier, currentRequest)) {
throw new ResourceNotFoundException();
}
try {
Expand Down

0 comments on commit 12768fa

Please sign in to comment.