-
Notifications
You must be signed in to change notification settings - Fork 3
/
ModeraSecurityBundle.php
35 lines (29 loc) · 1.26 KB
/
ModeraSecurityBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace Modera\SecurityBundle;
use Modera\SecurityBundle\DependencyInjection\MailServiceAliasCompilerPass;
use Sli\ExpanderBundle\Ext\ExtensionPoint;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* @author Sergei Vizel <[email protected]>
* @copyright 2014 Modera Foundation
*/
class ModeraSecurityBundle extends Bundle
{
const ROLE_ROOT_USER = 'ROLE_ROOT_USER';
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
$permissionsProviders = new ExtensionPoint('modera_security.permissions');
$permissionsProviders->setDescription(
'Allows to contribute new permissions that later can be installed by modera:security:install-permissions command.'
);
$container->addCompilerPass($permissionsProviders->createCompilerPass());
$permissionCategoriesProviders = new ExtensionPoint('modera_security.permission_categories');
$permissionCategoriesProviders->setDescription('Allows to contribute new permission categories.');
$container->addCompilerPass($permissionCategoriesProviders->createCompilerPass());
$container->addCompilerPass(new MailServiceAliasCompilerPass());
}
}