Skip to content

Commit

Permalink
Code climate
Browse files Browse the repository at this point in the history
  • Loading branch information
bbpennel committed Oct 24, 2024
1 parent e710900 commit e4e51d3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ public List<ContentObjectRecord> listViewableFiles(PID pid, AccessGroupSet princ
*/
public boolean hasViewableFiles(ContentObjectRecord briefObj, AccessGroupSet principals) {
String resourceType = briefObj.getResourceType();
if (ResourceType.File.nameEquals(resourceType)) {
if (briefObj.getDatastreamObject(DatastreamType.JP2_ACCESS_COPY.getId()) != null ||
briefObj.getDatastreamObject(DatastreamType.AUDIO_ACCESS_COPY.getId()) != null) {
if (ResourceType.File.nameEquals(resourceType) &&
(briefObj.getDatastreamObject(DatastreamType.JP2_ACCESS_COPY.getId()) != null ||
briefObj.getDatastreamObject(DatastreamType.AUDIO_ACCESS_COPY.getId()) != null)) {
return true;
}
}
if (!ResourceType.Work.nameEquals(resourceType)) {
return false;
Expand Down

0 comments on commit e4e51d3

Please sign in to comment.