119612: Remove group configuration and expose property to angular

This commit is contained in:
Jens Vannerum
2025-01-20 15:46:26 +01:00
parent a8b98bb7b7
commit c73c739deb
3 changed files with 1 additions and 16 deletions

View File

@@ -22,7 +22,6 @@ import org.dspace.content.service.ItemService;
import org.dspace.content.service.MetadataDSpaceCsvExportService;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.eperson.service.GroupService;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.scripts.handler.DSpaceRunnableHandler;
import org.dspace.services.ConfigurationService;
@@ -42,9 +41,6 @@ public class MetadataDSpaceCsvExportServiceImpl implements MetadataDSpaceCsvExpo
@Autowired
private ConfigurationService configurationService;
@Autowired
private GroupService groupService;
@Override
public DSpaceCSV handleExport(Context context, boolean exportAllItems, boolean exportAllMetadata, String identifier,
DSpaceRunnableHandler handler) throws Exception {
@@ -117,15 +113,6 @@ public class MetadataDSpaceCsvExportServiceImpl implements MetadataDSpaceCsvExpo
DSpaceRunnableHandler handler) throws SQLException {
int itemExportLimit = configurationService.getIntProperty(
"metadataexport.max.items", 500);
String[] ignoreLimitGroups = configurationService.getArrayProperty(
"metadataexport.admin.groups");
for (String group : ignoreLimitGroups) {
if (groupService.isMember(context, context.getCurrentUser(), group)) {
itemExportLimit = Integer.MAX_VALUE;
break;
}
}
List<Item> items = IteratorUtils.toList(toExport);
if (items.size() > itemExportLimit) {

View File

@@ -912,9 +912,6 @@ org.dspace.app.itemexport.max.size = 200
# If not set, this will default to 500 items
# metadataexport.max.items = 500
# A list of groups that are allowed to use the metadata-export script without any restrictions
#metadataexport.admin.groups = Administrator
### Batch Item import settings ###
# The directory where the results of imports will be placed (mapfile, upload file)

View File

@@ -59,3 +59,4 @@ rest.properties.exposed = ldn.notify.inbox
rest.properties.exposed = handle.canonical.prefix
rest.properties.exposed = contentreport.enable
rest.properties.exposed = duplicate.enable
rest.properties.exposed = metadataexport.max.items