From b7a17af6829ffd5627b2b881e5f5711ce723ccbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 22 Jun 2015 23:46:36 +0200 Subject: [PATCH] git status add role hierarchy --- DependencyInjection/ChillReportExtension.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/DependencyInjection/ChillReportExtension.php b/DependencyInjection/ChillReportExtension.php index fb5a285da..2df5a38ae 100644 --- a/DependencyInjection/ChillReportExtension.php +++ b/DependencyInjection/ChillReportExtension.php @@ -76,6 +76,16 @@ class ChillReportExtension extends Extension implements PrependExtensionInterfac ) )); } + + protected function prependRoleHierarchy(ContainerBuilder $container) + { + $container->prependExtensionConfig('security', array( + 'role_hierarchy' => array( + 'CHILL_REPORT_UPDATE' => array('CHILL_REPORT_SEE'), + 'CHILL_REPORT_CREATE' => array('CHILL_REPORT_SEE') + ) + )); + } /** * {@inheritdoc} @@ -86,5 +96,7 @@ class ChillReportExtension extends Extension implements PrependExtensionInterfac { $this->declareReportAsCustomizable($container); $this->declareRouting($container); + $this->prependRoleHierarchy($container); } + }