Skip to content

Commit

Permalink
119612: Remove group configuration and expose property to angular
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Vannerum committed Jan 24, 2025
1 parent a8b98bb commit c73c739
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
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;
Expand All @@ -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 {
Expand Down Expand Up @@ -117,15 +113,6 @@ private Iterator<Item> setItemsToExportWithLimit(Context context, Iterator<Item>
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) {
Expand Down
3 changes: 0 additions & 3 deletions dspace/config/dspace.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions dspace/config/modules/rest.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c73c739

Please sign in to comment.