From 20a55e85c6db3f9514e9d097616ef36995b4d521 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Tue, 25 Jul 2023 22:00:54 +0200 Subject: [PATCH] add missing properties --- src/Backend/View/Identity.php | 4 ++++ tests/Backend/Api/Identity/CollectionTest.php | 8 ++++++++ tests/Backend/Api/Identity/EntityTest.php | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/src/Backend/View/Identity.php b/src/Backend/View/Identity.php index 3da282c19..851382e37 100644 --- a/src/Backend/View/Identity.php +++ b/src/Backend/View/Identity.php @@ -68,6 +68,8 @@ public function getCollection(int $categoryId, int $startIndex, int $count, ?str 'itemsPerPage' => $count, 'entry' => $builder->doCollection([$this->getTable(Table\Identity::class), 'findAll'], [$condition, $startIndex, $count, $sortBy, $sortOrder], [ 'id' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ID), + 'roleId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ROLE_ID), + 'appId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_APP_ID), 'status' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_STATUS), 'name' => Table\Generated\IdentityTable::COLUMN_NAME, 'icon' => Table\Generated\IdentityTable::COLUMN_ICON, @@ -85,6 +87,8 @@ public function getEntity(string $id) $definition = $builder->doEntity([$this->getTable(Table\Identity::class), 'findOneByIdentifier'], [$id], [ 'id' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ID), + 'roleId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_ROLE_ID), + 'appId' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_APP_ID), 'status' => $builder->fieldInteger(Table\Generated\IdentityTable::COLUMN_STATUS), 'name' => Table\Generated\IdentityTable::COLUMN_NAME, 'icon' => Table\Generated\IdentityTable::COLUMN_ICON, diff --git a/tests/Backend/Api/Identity/CollectionTest.php b/tests/Backend/Api/Identity/CollectionTest.php index 3f60d40b2..3943dfc29 100644 --- a/tests/Backend/Api/Identity/CollectionTest.php +++ b/tests/Backend/Api/Identity/CollectionTest.php @@ -54,6 +54,8 @@ public function testGet() "entry": [ { "id": 1, + "roleId": 3, + "appId": 2, "status": 1, "name": "Facebook", "icon": "bi-facebook", @@ -62,6 +64,8 @@ public function testGet() }, { "id": 2, + "roleId": 3, + "appId": 2, "status": 1, "name": "GitHub", "icon": "bi-github", @@ -70,6 +74,8 @@ public function testGet() }, { "id": 3, + "roleId": 3, + "appId": 2, "status": 1, "name": "Google", "icon": "bi-google", @@ -78,6 +84,8 @@ public function testGet() }, { "id": 4, + "roleId": 3, + "appId": 2, "status": 1, "name": "OpenID", "icon": "bi-openid", diff --git a/tests/Backend/Api/Identity/EntityTest.php b/tests/Backend/Api/Identity/EntityTest.php index ce317a98f..a96ffc3a9 100644 --- a/tests/Backend/Api/Identity/EntityTest.php +++ b/tests/Backend/Api/Identity/EntityTest.php @@ -58,6 +58,8 @@ public function testGet() $expect = <<<'JSON' { "id": 2, + "roleId": 3, + "appId": 2, "status": 1, "name": "GitHub", "icon": "bi-github", @@ -92,6 +94,8 @@ public function testGetByName() $expect = <<<'JSON' { "id": 2, + "roleId": 3, + "appId": 2, "status": 1, "name": "GitHub", "icon": "bi-github",