From b628bc38ae0753e69727ab271ad1423e395fb6e9 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Mon, 28 Feb 2022 14:23:00 +0100 Subject: [PATCH] fix: [sharinggroups:view] Typo skipping org membership check --- src/Controller/SharingGroupsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/SharingGroupsController.php b/src/Controller/SharingGroupsController.php index 051f53e..380e454 100644 --- a/src/Controller/SharingGroupsController.php +++ b/src/Controller/SharingGroupsController.php @@ -65,7 +65,7 @@ class SharingGroupsController extends AppController 'contain' => ['SharingGroupOrgs', 'Organisations', 'Users' => ['fields' => ['id', 'username']]], 'afterFind' => function($data) use ($currentUser) { if (empty($currentUser['role']['perm_admin'])) { - $orgFround = false; + $orgFound = false; if (!empty($data['sharing_group_orgs'])) { foreach ($data['sharing_group_orgs'] as $org) { if ($org['id'] === $currentUser['organisation_id']) { @@ -73,7 +73,7 @@ class SharingGroupsController extends AppController } } } - if ($data['organisation_id'] !== $currentUser['organisation_id'] && !$orgFround) { + if ($data['organisation_id'] !== $currentUser['organisation_id'] && !$orgFound) { return null; } }