From 3fdbaf028580349a11f47421e11f09737dcf2ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCnther?= Date: Sat, 23 May 2026 15:58:06 +0200 Subject: [PATCH] Release --- app/Repositories/CostUnitRepository.php | 6 ++++-- app/Tasks/CloseCostUnit.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Repositories/CostUnitRepository.php b/app/Repositories/CostUnitRepository.php index e0ceb61..75df613 100644 --- a/app/Repositories/CostUnitRepository.php +++ b/app/Repositories/CostUnitRepository.php @@ -23,12 +23,14 @@ class CostUnitRepository { - public function getCurrentEvents() : array { + public function getCurrentEvents(bool $disableAccessCheck = false) : array { return $this->getCostUnitsByCriteria([ 'allow_new' => true, 'type' => CostUnitType::COST_UNIT_TYPE_EVENT, 'archived' => false - ]); + ], + true, + $disableAccessCheck); } public function getRunningJobs() : array { diff --git a/app/Tasks/CloseCostUnit.php b/app/Tasks/CloseCostUnit.php index 842e03d..6854426 100644 --- a/app/Tasks/CloseCostUnit.php +++ b/app/Tasks/CloseCostUnit.php @@ -19,7 +19,7 @@ class CloseCostUnit implements CronTask { $billingResetEnd = clone $now; $billingResetEnd->add(new \DateInterval('P6W')); /** @var CostUnit $costUnit */ - foreach ($costUnitRepository->getCurrentEvents() as $costUnit) { + foreach ($costUnitRepository->getCurrentEvents(true) as $costUnit) { $billingEnd = $costUnit['billing_deadline']; if ($billingEnd === null) {