From c58674d1333baf2bf981356924e054f85c424568 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Tue, 17 Feb 2026 15:15:30 +0100 Subject: [PATCH] Projektarbeiten cancelVertrag permission check bugfix (added array_column to get oes) --- application/controllers/api/frontend/v1/stv/Vertrag.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Vertrag.php b/application/controllers/api/frontend/v1/stv/Vertrag.php index f94fe795e..c2b0f713c 100644 --- a/application/controllers/api/frontend/v1/stv/Vertrag.php +++ b/application/controllers/api/frontend/v1/stv/Vertrag.php @@ -76,9 +76,7 @@ class Vertrag extends FHCAPI_Controller if (isError($allOe)) $this->terminateWithError(getError($allOe), self::ERROR_TYPE_GENERAL); - $allOe = hasData($allOe) ? getData($allOe) : []; - - $this->addMeta('oe', $allOe); + $allOe = hasData($allOe) ? array_column(getData($allOe), 'oe_kurzbz') : []; // * then check if the user has permissions to cancel the corresponding lv-organisational units if (!$this->permissionlib->isBerechtigtMultipleOe('admin', $allOe, 'suid') &&