Skip to content

Commit

Permalink
Merged in DSC-740 (pull request DSpace#497)
Browse files Browse the repository at this point in the history
[CST-6317] New COLLECTIONS rendering

Approved-by: Davide Negretti
  • Loading branch information
Sufiyan Shaikh authored and Davide Negretti committed Sep 20, 2023
2 parents 4efae73 + 166569a commit 2849bb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public enum CrisLayoutBoxTypes {
IIIFVIEWER,
METADATA,
RELATION,
METRICS
METRICS,
COLLECTIONS
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ public boolean hasContent(Context context, CrisLayoutBox box, Item item) {
return hasRelationBoxContent(context, box, item);
case "METRICS":
return hasMetricsBoxContent(context, box, item);
case "COLLECTIONS":
return isOwningCollectionPresent(item);
case "IIIFVIEWER":
return isIiifEnabled(item);
case "METADATA":
Expand Down Expand Up @@ -246,6 +248,10 @@ private boolean isIiifEnabled(Item item) {
new MetadataFieldName("dspace.iiif.enabled"), Item.ANY));
}

private boolean isOwningCollectionPresent(Item item) {
return Objects.nonNull(item.getOwningCollection());
}

private boolean currentUserIsNotAllowedToReadItem(Context context, Item item) {
try {
return !authorizeService.authorizeActionBoolean(context, item, Constants.READ);
Expand Down

0 comments on commit 2849bb1

Please sign in to comment.