Skip to content
Commits on Source (5)
......@@ -6,7 +6,7 @@
"php": ">=7.3",
"ext-json": "*",
"api-platform/core": "^2.6.3",
"dbp/relay-core-bundle": "^0.1.75",
"dbp/relay-core-bundle": "^0.1.88",
"guzzlehttp/guzzle": "^7.0",
"nelmio/cors-bundle": "^2.1.0",
"phpdocumentor/reflection-docblock": "^3.0 || ^4.0 || ^5.0",
......@@ -31,12 +31,6 @@
"symfony/phpunit-bridge": "^5.2",
"vimeo/psalm": "^4.4"
},
"repositories": [
{
"type": "vcs",
"url": "git@gitlab.tugraz.at:dbp/relay/dbp-relay-core-bundle.git"
}
],
"autoload": {
"psr-4": {
"Dbp\\Relay\\BasePersonBundle\\": "src/"
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "cec90c82e15b22b04126f03784eae38f",
"content-hash": "4fc79f39b1258770790c8bd2d9761812",
"packages": [
{
"name": "api-platform/core",
......@@ -169,11 +169,17 @@
},
{
"name": "dbp/relay-core-bundle",
"version": "v0.1.82",
"version": "v0.1.88",
"source": {
"type": "git",
"url": "git@gitlab.tugraz.at:dbp/relay/dbp-relay-core-bundle.git",
"reference": "26b368389e5996a52a4afe7f718365e33bd16f91"
"url": "https://github.com/digital-blueprint/relay-core-bundle.git",
"reference": "3da7929f4f8efb6bd6cef0fbd9a64bb2d5c7e407"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/digital-blueprint/relay-core-bundle/zipball/3da7929f4f8efb6bd6cef0fbd9a64bb2d5c7e407",
"reference": "3da7929f4f8efb6bd6cef0fbd9a64bb2d5c7e407",
"shasum": ""
},
"require": {
"api-platform/core": "^2.6.8 <2.7.0",
......@@ -233,47 +239,16 @@
"Dbp\\Relay\\CoreBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Dbp\\Relay\\CoreBundle\\Tests\\": "tests/"
}
},
"scripts": {
"post-install-cmd": [
"cghooks add --ignore-lock"
],
"post-update-cmd": [
"cghooks update"
],
"test": [
"@php vendor/bin/phpunit"
],
"phpstan": [
"@php vendor/bin/phpstan analyze --ansi"
],
"psalm": [
"@php vendor/bin/psalm"
],
"lint": [
"@composer run cs",
"@composer run phpstan",
"@composer run psalm"
],
"cs-fix": [
"@php vendor/bin/php-cs-fixer --ansi fix"
],
"cs": [
"@php vendor/bin/php-cs-fixer --ansi fix --dry-run --diff"
],
"coverage": [
"@php -dxdebug.mode=coverage vendor/bin/phpunit --coverage-html _coverage"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"AGPL-3.0-or-later"
],
"description": "The core bundle of the Relay API gateway",
"time": "2023-02-23T14:57:20+00:00"
"support": {
"issues": "https://github.com/digital-blueprint/relay-core-bundle/issues",
"source": "https://github.com/digital-blueprint/relay-core-bundle/tree/v0.1.88"
},
"time": "2023-02-28T11:30:57+00:00"
},
{
"name": "doctrine/annotations",
......@@ -7846,21 +7821,21 @@
},
{
"name": "phpstan/phpstan-phpunit",
"version": "1.3.4",
"version": "1.3.8",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-phpunit.git",
"reference": "d77af96c1aaec28f7c0293677132eaaad079e01b"
"reference": "4a19a3cb5b2d28b143f350e45e9f6e17e2cb81b5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/d77af96c1aaec28f7c0293677132eaaad079e01b",
"reference": "d77af96c1aaec28f7c0293677132eaaad079e01b",
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4a19a3cb5b2d28b143f350e45e9f6e17e2cb81b5",
"reference": "4a19a3cb5b2d28b143f350e45e9f6e17e2cb81b5",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.9.3"
"phpstan/phpstan": "^1.10"
},
"conflict": {
"phpunit/phpunit": "<7.0"
......@@ -7892,29 +7867,29 @@
"description": "PHPUnit extensions and rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.4"
"source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.8"
},
"time": "2023-02-09T08:05:29+00:00"
"time": "2023-02-25T15:14:31+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.24",
"version": "9.2.25",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed"
"reference": "0e2b40518197a8c0d4b08bc34dfff1c99c508954"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed",
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/0e2b40518197a8c0d4b08bc34dfff1c99c508954",
"reference": "0e2b40518197a8c0d4b08bc34dfff1c99c508954",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.14",
"nikic/php-parser": "^4.15",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
......@@ -7963,7 +7938,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.25"
},
"funding": [
{
......@@ -7971,7 +7946,7 @@
"type": "github"
}
],
"time": "2023-01-26T08:26:55+00:00"
"time": "2023-02-25T05:32:00+00:00"
},
{
"name": "phpunit/php-file-iterator",
......
......@@ -5,21 +5,21 @@ declare(strict_types=1);
namespace Dbp\Relay\BasePersonBundle\Authorization;
use Dbp\Relay\BasePersonBundle\Entity\Person;
use Dbp\Relay\CoreBundle\Authorization\AbstractAuthorizationService;
use Dbp\Relay\CoreBundle\Authorization\AuthorizationConfigDefinition;
use Dbp\Relay\CoreBundle\Authorization\Serializer\AbstractEntityDeNormalizer;
class AuthorizationService extends AbstractAuthorizationService
class PersonNormalizer extends AbstractEntityDeNormalizer
{
public function __construct()
{
$isLoggedInUserExpression = 'user.getIdentifier() == entity.getIdentifier()';
$isCurrentlyLoggedInUserExpression = 'user.getIdentifier() == entity.getIdentifier()';
$this->configure([], [], [
$this->configureEntities([
'BasePerson' => [
AuthorizationConfigDefinition::ENTITY_CLASS_NAME_CONFIG_NODE => Person::class,
AuthorizationConfigDefinition::ENTITY_READ_ACCESS_CONFIG_NODE => [
'email' => $isLoggedInUserExpression,
'birthDate' => $isLoggedInUserExpression,
'email' => $isCurrentlyLoggedInUserExpression,
'birthDate' => $isCurrentlyLoggedInUserExpression,
],
],
]);
......
......@@ -10,7 +10,7 @@ services:
autowire: true
autoconfigure: true
Dbp\Relay\BasePersonBundle\Authorization\AuthorizationService:
Dbp\Relay\BasePersonBundle\Authorization\PersonNormalizer:
autowire: true
autoconfigure: true
......