mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 20:43:49 +00:00
add acl to activity + bootstrap php
This commit is contained in:
@@ -46,11 +46,17 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
}
|
||||
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
$this->prependRoutes($container);
|
||||
$this->prependAuthorization($container);
|
||||
}
|
||||
|
||||
/* (non-PHPdoc)
|
||||
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
|
||||
*/
|
||||
public function prepend(ContainerBuilder $container)
|
||||
public function prependRoutes(ContainerBuilder $container)
|
||||
{
|
||||
//add routes for custom bundle
|
||||
$container->prependExtensionConfig('chill_main', array(
|
||||
@@ -61,4 +67,14 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public function prependAuthorization(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('security', array(
|
||||
'role_hierarchy' => array(
|
||||
'CHILL_ACTIVITY_UPDATE' => array('CHILL_ACTIVITY_SEE'),
|
||||
'CHILL_ACTIVITY_CREATE' => array('CHILL_ACTIVITY_SEE')
|
||||
)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user