diff --git a/composer.json b/composer.json index 25d5ea7f..edfaf2fa 100644 --- a/composer.json +++ b/composer.json @@ -60,6 +60,7 @@ "symfony/intl": "^6.0", "symfony/mailer": "^6.0", "symfony/monolog-bundle": "^3.4", + "symfony/rate-limiter": "^6.0", "symfony/runtime": "^6.0", "symfony/security-bundle": "^6.0", "symfony/security-csrf": "^6.0", diff --git a/composer.lock b/composer.lock index eba0d57a..40662509 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "f700e1bba0e352cdcf62f1b6c80af9cb", + "content-hash": "11d70b2ed4a4024ab1fb5d7e9bd8e436", "packages": [ { "name": "bacon/bacon-qr-code", @@ -312,16 +312,16 @@ }, { "name": "doctrine/annotations", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302" + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/d02c9f3742044e17d5fa8d28d8402a2d95c33302", - "reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", "shasum": "" }, "require": { @@ -382,9 +382,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.0" + "source": "https://github.com/doctrine/annotations/tree/2.0.1" }, - "time": "2022-12-19T18:17:20+00:00" + "time": "2023-02-02T22:02:53+00:00" }, { "name": "doctrine/cache", @@ -812,16 +812,16 @@ }, { "name": "doctrine/doctrine-bundle", - "version": "2.8.2", + "version": "2.8.3", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "251cd5aaea32bb92cdad4204840786b317dcdd4c" + "reference": "fd67ba64db3c806f626a33dcab15a4db0c77652e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/251cd5aaea32bb92cdad4204840786b317dcdd4c", - "reference": "251cd5aaea32bb92cdad4204840786b317dcdd4c", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/fd67ba64db3c806f626a33dcab15a4db0c77652e", + "reference": "fd67ba64db3c806f626a33dcab15a4db0c77652e", "shasum": "" }, "require": { @@ -835,7 +835,7 @@ "symfony/console": "^5.4 || ^6.0", "symfony/dependency-injection": "^5.4 || ^6.0", "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/doctrine-bridge": "^5.4.7 || ^6.0.7", + "symfony/doctrine-bridge": "^5.4.19 || ^6.0.7", "symfony/framework-bundle": "^5.4 || ^6.0", "symfony/service-contracts": "^1.1.1 || ^2.0 || ^3" }, @@ -907,7 +907,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/2.8.2" + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.8.3" }, "funding": [ { @@ -923,7 +923,7 @@ "type": "tidelift" } ], - "time": "2023-01-06T11:42:10+00:00" + "time": "2023-02-03T09:32:42+00:00" }, { "name": "doctrine/doctrine-migrations-bundle", @@ -1545,16 +1545,16 @@ }, { "name": "doctrine/persistence", - "version": "3.1.3", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "920da294b4bb0bb527f2a91ed60c18213435880f" + "reference": "8bf8ab15960787f1a49d405f6eb8c787b4841119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/920da294b4bb0bb527f2a91ed60c18213435880f", - "reference": "920da294b4bb0bb527f2a91ed60c18213435880f", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/8bf8ab15960787f1a49d405f6eb8c787b4841119", + "reference": "8bf8ab15960787f1a49d405f6eb8c787b4841119", "shasum": "" }, "require": { @@ -1623,7 +1623,7 @@ ], "support": { "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/3.1.3" + "source": "https://github.com/doctrine/persistence/tree/3.1.4" }, "funding": [ { @@ -1639,7 +1639,7 @@ "type": "tidelift" } ], - "time": "2023-01-19T13:39:42+00:00" + "time": "2023-02-03T11:13:07+00:00" }, { "name": "doctrine/sql-formatter", @@ -2361,16 +2361,16 @@ }, { "name": "jms/serializer", - "version": "3.21.0", + "version": "3.22.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "cc49ca6cd97baa173166c1f4fc54521964cf28bd" + "reference": "576d226178697534e214531dbf80058637a10ebc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/cc49ca6cd97baa173166c1f4fc54521964cf28bd", - "reference": "cc49ca6cd97baa173166c1f4fc54521964cf28bd", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/576d226178697534e214531dbf80058637a10ebc", + "reference": "576d226178697534e214531dbf80058637a10ebc", "shasum": "" }, "require": { @@ -2445,7 +2445,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/serializer/issues", - "source": "https://github.com/schmittjoh/serializer/tree/3.21.0" + "source": "https://github.com/schmittjoh/serializer/tree/3.22.0" }, "funding": [ { @@ -2453,20 +2453,20 @@ "type": "github" } ], - "time": "2023-01-10T13:08:17+00:00" + "time": "2023-02-03T04:58:11+00:00" }, { "name": "jms/serializer-bundle", - "version": "5.2.0", + "version": "5.2.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/JMSSerializerBundle.git", - "reference": "cdc876a8bc4611279a7ec970f3da2052cda55078" + "reference": "c772704a0b3cb772fa391ff5ac7d36fd6cecebf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/cdc876a8bc4611279a7ec970f3da2052cda55078", - "reference": "cdc876a8bc4611279a7ec970f3da2052cda55078", + "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/c772704a0b3cb772fa391ff5ac7d36fd6cecebf4", + "reference": "c772704a0b3cb772fa391ff5ac7d36fd6cecebf4", "shasum": "" }, "require": { @@ -2532,7 +2532,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/JMSSerializerBundle/issues", - "source": "https://github.com/schmittjoh/JMSSerializerBundle/tree/5.2.0" + "source": "https://github.com/schmittjoh/JMSSerializerBundle/tree/5.2.1" }, "funding": [ { @@ -2540,7 +2540,7 @@ "type": "github" } ], - "time": "2023-01-09T16:25:13+00:00" + "time": "2023-02-05T11:03:45+00:00" }, { "name": "kevinpapst/tabler-bundle", @@ -3065,16 +3065,16 @@ }, { "name": "monolog/monolog", - "version": "3.2.0", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "305444bc6fb6c89e490f4b34fa6e979584d7fa81" + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/305444bc6fb6c89e490f4b34fa6e979584d7fa81", - "reference": "305444bc6fb6c89e490f4b34fa6e979584d7fa81", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", "shasum": "" }, "require": { @@ -3089,16 +3089,16 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2", - "guzzlehttp/guzzle": "^7.4", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.4", + "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "phpunit/phpunit": "^9.5.16", - "predis/predis": "^1.1", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "^9.5.26", + "predis/predis": "^1.1 || ^2", "ruflin/elastica": "^7", "symfony/mailer": "^5.4 || ^6", "symfony/mime": "^5.4 || ^6" @@ -3150,7 +3150,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.2.0" + "source": "https://github.com/Seldaek/monolog/tree/3.3.1" }, "funding": [ { @@ -3162,7 +3162,7 @@ "type": "tidelift" } ], - "time": "2022-07-24T12:00:55+00:00" + "time": "2023-02-06T13:46:10+00:00" }, { "name": "mpdf/mpdf", @@ -8131,6 +8131,79 @@ ], "time": "2023-01-20T17:45:48+00:00" }, + { + "name": "symfony/rate-limiter", + "version": "v6.2.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/rate-limiter.git", + "reference": "df0da8017c9a304b19466b45c505aaa9cf92cfe1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/rate-limiter/zipball/df0da8017c9a304b19466b45c505aaa9cf92cfe1", + "reference": "df0da8017c9a304b19466b45c505aaa9cf92cfe1", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/options-resolver": "^5.4|^6.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/lock": "^5.4|^6.0" + }, + "suggest": { + "symfony/lock": "For preventing race conditions in rate limiters" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\RateLimiter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Wouter de Jong", + "email": "wouter@wouterj.nl" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a Token Bucket implementation to rate limit input and output in your application", + "homepage": "https://symfony.com", + "keywords": [ + "limiter", + "rate-limiter" + ], + "support": { + "source": "https://github.com/symfony/rate-limiter/tree/v6.2.5" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-01T08:38:09+00:00" + }, { "name": "symfony/routing", "version": "v6.2.5", @@ -10430,16 +10503,16 @@ }, { "name": "zircote/swagger-php", - "version": "4.6.0", + "version": "4.6.1", "source": { "type": "git", "url": "https://github.com/zircote/swagger-php.git", - "reference": "ee8147745c92dd4404adb531751ce32676b888d4" + "reference": "e449670473d7ecaff75dff744e8e9be68a79a44c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zircote/swagger-php/zipball/ee8147745c92dd4404adb531751ce32676b888d4", - "reference": "ee8147745c92dd4404adb531751ce32676b888d4", + "url": "https://api.github.com/repos/zircote/swagger-php/zipball/e449670473d7ecaff75dff744e8e9be68a79a44c", + "reference": "e449670473d7ecaff75dff744e8e9be68a79a44c", "shasum": "" }, "require": { @@ -10502,9 +10575,9 @@ ], "support": { "issues": "https://github.com/zircote/swagger-php/issues", - "source": "https://github.com/zircote/swagger-php/tree/4.6.0" + "source": "https://github.com/zircote/swagger-php/tree/4.6.1" }, - "time": "2023-01-13T00:51:01+00:00" + "time": "2023-02-03T01:25:00+00:00" } ], "packages-dev": [ @@ -10647,16 +10720,16 @@ }, { "name": "dama/doctrine-test-bundle", - "version": "v7.1.1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/dmaicher/doctrine-test-bundle.git", - "reference": "279a554556bed387a6aaae0c13cc982d4874773b" + "reference": "91abe52540370d596199a79eff3d823d5b81d41d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/279a554556bed387a6aaae0c13cc982d4874773b", - "reference": "279a554556bed387a6aaae0c13cc982d4874773b", + "url": "https://api.github.com/repos/dmaicher/doctrine-test-bundle/zipball/91abe52540370d596199a79eff3d823d5b81d41d", + "reference": "91abe52540370d596199a79eff3d823d5b81d41d", "shasum": "" }, "require": { @@ -10665,17 +10738,17 @@ "ext-json": "*", "php": "^7.3 || ^8.0", "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.4 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0" + "symfony/cache": "^5.4 || ^6.0", + "symfony/framework-bundle": "^5.4 || ^6.0" }, "require-dev": { "behat/behat": "^3.0", "doctrine/cache": "^1.12", "phpstan/phpstan": "^1.2", - "phpunit/phpunit": "^8.0 || ^9.0", + "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0", "symfony/phpunit-bridge": "^6.0", - "symfony/process": "^4.4 || ^5.4 || ^6.0", - "symfony/yaml": "^4.4 || ^5.4 || ^6.0" + "symfony/process": "^5.4 || ^6.0", + "symfony/yaml": "^5.4 || ^6.0" }, "type": "symfony-bundle", "extra": { @@ -10708,9 +10781,9 @@ ], "support": { "issues": "https://github.com/dmaicher/doctrine-test-bundle/issues", - "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v7.1.1" + "source": "https://github.com/dmaicher/doctrine-test-bundle/tree/v7.2.0" }, - "time": "2022-07-01T12:06:31+00:00" + "time": "2023-02-05T09:12:26+00:00" }, { "name": "doctrine/data-fixtures", @@ -11502,16 +11575,16 @@ }, { "name": "phpstan/phpstan-symfony", - "version": "1.2.22", + "version": "1.2.23", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "cbf5b9ceadab8365ed46db42dcd23db1a4c26c93" + "reference": "8a8d0538ca943b20beda7e9799e14fb3683262d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/cbf5b9ceadab8365ed46db42dcd23db1a4c26c93", - "reference": "cbf5b9ceadab8365ed46db42dcd23db1a4c26c93", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/8a8d0538ca943b20beda7e9799e14fb3683262d4", + "reference": "8a8d0538ca943b20beda7e9799e14fb3683262d4", "shasum": "" }, "require": { @@ -11567,9 +11640,9 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.22" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.23" }, - "time": "2023-02-01T13:26:41+00:00" + "time": "2023-02-06T10:42:02+00:00" }, { "name": "phpunit/php-code-coverage", @@ -11891,16 +11964,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.28", + "version": "9.6.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e" + "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e", - "reference": "954ca3113a03bf780d22f07bf055d883ee04b65e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7b1615e3e887d6c719121c6d4a44b0ab9645555", + "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555", "shasum": "" }, "require": { @@ -11942,7 +12015,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { @@ -11973,7 +12046,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.3" }, "funding": [ { @@ -11989,7 +12062,7 @@ "type": "tidelift" } ], - "time": "2023-01-14T12:32:24+00:00" + "time": "2023-02-04T13:37:15+00:00" }, { "name": "sebastian/cli-parser", @@ -12357,16 +12430,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", - "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { @@ -12408,7 +12481,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -12416,7 +12489,7 @@ "type": "github" } ], - "time": "2022-04-03T09:37:03+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", @@ -12730,16 +12803,16 @@ }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { @@ -12778,10 +12851,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -12789,7 +12862,7 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", @@ -12848,16 +12921,16 @@ }, { "name": "sebastian/type", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", - "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", "shasum": "" }, "require": { @@ -12892,7 +12965,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -12900,7 +12973,7 @@ "type": "github" } ], - "time": "2022-09-12T14:47:03+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 6d2585b9..c7b5e49c 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -61,6 +61,10 @@ security: path: logout target: homepage + login_throttling: + max_attempts: 5 + interval: '5 minutes' + access_decision_manager: strategy: unanimous allow_if_all_abstain: false diff --git a/src/EventSubscriber/MenuSubscriber.php b/src/EventSubscriber/MenuSubscriber.php index e05b225f..819e74e3 100644 --- a/src/EventSubscriber/MenuSubscriber.php +++ b/src/EventSubscriber/MenuSubscriber.php @@ -94,18 +94,21 @@ final class MenuSubscriber implements EventSubscriberInterface } $invoice = new MenuItemModel('invoice', 'invoices', null, [], 'invoice'); - $invoice->setChildRoutes(['admin_invoice_template', 'admin_invoice_template_edit', 'admin_invoice_template_create', 'admin_invoice_template_copy', 'admin_invoice_list', 'admin_invoice_document_upload', 'admin_invoice_edit']); if ($auth->isGranted('create_invoice')) { $invoice->addChild(new MenuItemModel('invoice', 'invoice_form.title', 'invoice', [], 'invoice')); } if ($auth->isGranted('view_invoice')) { - $invoice->addChild(new MenuItemModel('invoice-listing', 'all_invoices', 'admin_invoice_list', [], 'list')); + $tmpMenu = new MenuItemModel('invoice-listing', 'all_invoices', 'admin_invoice_list', [], 'list'); + $tmpMenu->setChildRoutes(['admin_invoice_edit']); + $invoice->addChild($tmpMenu); } if ($auth->isGranted('manage_invoice_template')) { - $invoice->addChild(new MenuItemModel('invoice-template', 'admin_invoice_template.title', 'admin_invoice_template', [], 'invoice-template')); + $tmpMenu = new MenuItemModel('invoice-template', 'admin_invoice_template.title', 'admin_invoice_template', [], 'invoice-template'); + $tmpMenu->setChildRoutes(['admin_invoice_template_edit', 'admin_invoice_template_create', 'admin_invoice_template_copy', 'admin_invoice_document_upload']); + $invoice->addChild($tmpMenu); } if ($invoice->hasChildren()) { diff --git a/templates/calendar/user.html.twig b/templates/calendar/user.html.twig index c0f52adf..7e3bb9a0 100644 --- a/templates/calendar/user.html.twig +++ b/templates/calendar/user.html.twig @@ -5,7 +5,7 @@