Skip to content

Commit

Permalink
consider security level in browse index plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
floriangantner committed May 2, 2024
1 parent 3b19272 commit 7063ecb
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,20 @@ public void additionalIndex(Context context, IndexableObject indexableObject, So
Boolean.FALSE),
true);

// the maximum security level (if not null) which ist still indexed
Integer maxsecuritylevel = DSpaceServicesFactory
.getInstance()
.getConfigurationService()
.getIntProperty("discovery.index.securitylevel.maxlevel", 0);


for (int x = 0; x < values.size(); x++) {
MetadataValue val = values.get(x);

if (val.getSecurityLevel() != null && val.getSecurityLevel() > maxsecuritylevel) {
continue;
}

boolean hasChoiceAuthority = choiceAuthorityService
.isChoicesConfigured(metadataAuthorityService
.makeFieldKey(val.getSchema(), val.getElement(), val.getQualifier())
Expand Down

0 comments on commit 7063ecb

Please sign in to comment.