bug5827: only counting stats for events listed on homepage (isPublic()==true)

This commit is contained in:
Axel Uhl
2023-03-27 16:46:30 +02:00
parent a1daaa404c
commit 428607047f
@@ -4748,7 +4748,7 @@ Replicator {
public Map<Integer, Statistics> getLocalStatisticsByYear() {
final Map<Integer, StatisticsCalculator> calculators = new HashMap<>();
getAllEvents().forEach((event) -> {
if (getSecurityService().hasCurrentUserReadPermission(event)) {
if (getSecurityService().hasCurrentUserReadPermission(event) && event.isPublic()) {
final Integer eventYear = EventUtil.getYearOfEvent(event);
// The year may be null if the event has no start date set
// In this case the event is ignored for the yearly