Skip to content

Commit 7063ecb

Browse files
consider security level in browse index plugins
1 parent 3b19272 commit 7063ecb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dspace-api/src/main/java/org/dspace/discovery/SolrServiceMetadataBrowseIndexingPlugin.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,20 @@ public void additionalIndex(Context context, IndexableObject indexableObject, So
125125
Boolean.FALSE),
126126
true);
127127

128+
// the maximum security level (if not null) which ist still indexed
129+
Integer maxsecuritylevel = DSpaceServicesFactory
130+
.getInstance()
131+
.getConfigurationService()
132+
.getIntProperty("discovery.index.securitylevel.maxlevel", 0);
133+
134+
128135
for (int x = 0; x < values.size(); x++) {
129136
MetadataValue val = values.get(x);
137+
138+
if (val.getSecurityLevel() != null && val.getSecurityLevel() > maxsecuritylevel) {
139+
continue;
140+
}
141+
130142
boolean hasChoiceAuthority = choiceAuthorityService
131143
.isChoicesConfigured(metadataAuthorityService
132144
.makeFieldKey(val.getSchema(), val.getElement(), val.getQualifier())

0 commit comments

Comments
 (0)