From 8dbc5ae0165822e7b18cbdc68b3fc37a606ba0c8 Mon Sep 17 00:00:00 2001 From: iglocska Date: Thu, 25 Jun 2020 02:05:28 +0200 Subject: [PATCH] fix: [sharing groups] don't include ALL user details in the sharing group --- 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 4b89034..969e1b0 100644 --- a/src/Controller/SharingGroupsController.php +++ b/src/Controller/SharingGroupsController.php @@ -12,7 +12,7 @@ class SharingGroupsController extends AppController public function index() { $this->CRUD->index([ - 'contain' => ['SharingGroupOrgs', 'Organisations', 'Users'], + 'contain' => ['SharingGroupOrgs', 'Organisations', 'Users' => ['fields' => ['id', 'username']]], 'filters' => ['uuid', 'description', 'releasability', 'Organisations.name', 'Organisations.uuid'] ]); if ($this->ParamHandler->isRest()) { @@ -46,7 +46,7 @@ class SharingGroupsController extends AppController public function view($id) { $this->CRUD->view($id, [ - 'contain' => ['SharingGroupOrgs', 'Organisations', 'Users'] + 'contain' => ['SharingGroupOrgs', 'Organisations', 'Users' => ['fields' => ['id', 'username']]] ]); if ($this->ParamHandler->isRest()) { return $this->restResponsePayload;