From 47419b8396604df616905b1bd976d5c385651904 Mon Sep 17 00:00:00 2001 From: Kamil Madejski Date: Mon, 12 Mar 2018 15:33:43 +0100 Subject: [PATCH] EZP-28926: Add validation for PermissionResolver::hasAccess(module, function) arguments (#2273) * [WIP][6.7] Add validation for hasAccess(module, function) arguments To avoid issues such as https://github.com/ezsystems/ezplatform-admin-ui/pull/358 Todo: - Find a way to move `eZ/Bundle/EzPublishCoreBundle/Resources/config/policies.yml` into core and reuse across Core and CoreBundle to get rid of the internal hard coded policy map. - Unit tests, some failing with `Argument 'module' is invalid: 'module: test-module/ function: test-function' is wrong value` * EZP-28926: Add validation for PermissionResolver::hasAccess(module, function) arguments * CS fix * Added missing empty line * Updated specification * Added deprecated info * fixup! Added missing empty line * Improved test code quality --- Tests/FieldType/BaseIntegrationTest.php | 1 + Tests/FieldType/FileBaseIntegrationTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/Tests/FieldType/BaseIntegrationTest.php b/Tests/FieldType/BaseIntegrationTest.php index 1ece23528..837559c67 100644 --- a/Tests/FieldType/BaseIntegrationTest.php +++ b/Tests/FieldType/BaseIntegrationTest.php @@ -584,6 +584,7 @@ protected function getContainer() $loader->load('fieldtype_services.yml'); $loader->load('utils.yml'); $loader->load('tests/common.yml'); + $loader->load('policies.yml'); $containerBuilder->setParameter('ezpublish.kernel.root_dir', $installDir); diff --git a/Tests/FieldType/FileBaseIntegrationTest.php b/Tests/FieldType/FileBaseIntegrationTest.php index fa743f321..2ac593d97 100644 --- a/Tests/FieldType/FileBaseIntegrationTest.php +++ b/Tests/FieldType/FileBaseIntegrationTest.php @@ -147,6 +147,7 @@ protected function getContainer() $loader->load('fieldtype_services.yml'); $loader->load('utils.yml'); $loader->load('tests/common.yml'); + $loader->load('policies.yml'); $containerBuilder->setParameter('ezpublish.kernel.root_dir', $installDir);