Skip to content
Snippets Groups Projects
Commit f1c0a316 authored by Groß-Vogt, Tobias's avatar Groß-Vogt, Tobias
Browse files

adaptions to AbstractDataProvider update from core; local data attributes and...

adaptions to AbstractDataProvider update from core; local data attributes and authorization now configutred here instead of connector
parent bdd99d4b
No related branches found
No related tags found
No related merge requests found
Pipeline #235520 passed
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"php": ">=7.3", "php": ">=7.3",
"ext-json": "*", "ext-json": "*",
"api-platform/core": "^2.6", "api-platform/core": "^2.6",
"dbp/relay-core-bundle": "^0.1.53", "dbp/relay-core-bundle": "^0.1.91",
"symfony/event-dispatcher": "^5.4", "symfony/event-dispatcher": "^5.4",
"symfony/framework-bundle": "^5.4" "symfony/framework-bundle": "^5.4"
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "e202c6f86b455481b2d2750227e949a8", "content-hash": "445972d6a65a069cec8fd90645f2a525",
"packages": [ "packages": [
{ {
"name": "api-platform/core", "name": "api-platform/core",
...@@ -169,16 +169,16 @@ ...@@ -169,16 +169,16 @@
}, },
{ {
"name": "dbp/relay-core-bundle", "name": "dbp/relay-core-bundle",
"version": "v0.1.90", "version": "v0.1.91",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/digital-blueprint/relay-core-bundle.git", "url": "https://github.com/digital-blueprint/relay-core-bundle.git",
"reference": "da90f97ea72c6e0361fa18de31dc0e0c141b1376" "reference": "9a93c21af9466b47f9763420d668f49c5bf08ac8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/digital-blueprint/relay-core-bundle/zipball/da90f97ea72c6e0361fa18de31dc0e0c141b1376", "url": "https://api.github.com/repos/digital-blueprint/relay-core-bundle/zipball/9a93c21af9466b47f9763420d668f49c5bf08ac8",
"reference": "da90f97ea72c6e0361fa18de31dc0e0c141b1376", "reference": "9a93c21af9466b47f9763420d668f49c5bf08ac8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -246,9 +246,9 @@ ...@@ -246,9 +246,9 @@
"description": "The core bundle of the Relay API gateway", "description": "The core bundle of the Relay API gateway",
"support": { "support": {
"issues": "https://github.com/digital-blueprint/relay-core-bundle/issues", "issues": "https://github.com/digital-blueprint/relay-core-bundle/issues",
"source": "https://github.com/digital-blueprint/relay-core-bundle/tree/v0.1.90" "source": "https://github.com/digital-blueprint/relay-core-bundle/tree/v0.1.91"
}, },
"time": "2023-03-06T13:46:06+00:00" "time": "2023-03-23T08:54:16+00:00"
}, },
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
...@@ -10177,5 +10177,5 @@ ...@@ -10177,5 +10177,5 @@
"platform-overrides": { "platform-overrides": {
"php": "7.3" "php": "7.3"
}, },
"plugin-api-version": "2.3.0" "plugin-api-version": "2.2.0"
} }
...@@ -16,19 +16,18 @@ class ProxyDataProvider extends AbstractDataProvider ...@@ -16,19 +16,18 @@ class ProxyDataProvider extends AbstractDataProvider
return ProxyData::class; return ProxyData::class;
} }
protected function getItemById($id, array $options = []): object protected function isUserGrantedOperationAccess(int $operation): bool
{ {
return new ProxyData(); return $this->isUserAuthenticated();
} }
protected function getPage(int $currentPageNumber, int $maxNumItemsPerPage, array $filters = [], array $options = []): array protected function getItemById($id, array $filters = [], array $options = []): object
{ {
return []; throw ApiError::withDetails(Response::HTTP_NOT_IMPLEMENTED, 'GET operations not implemented for this resource');
} }
protected function onOperationStart(int $operation) protected function getPage(int $currentPageNumber, int $maxNumItemsPerPage, array $filters = [], array $options = []): array
{ {
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY'); return [];
throw ApiError::withDetails(Response::HTTP_NOT_IMPLEMENTED, 'GET operations not implemented for this resource');
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment