Skip to content

Commit 55f84a3

Browse files
committed
[SecurityBundle] disable the init:acl command if ACL is not used
1 parent fd140fc commit 55f84a3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@
2323
*/
2424
class InitAclCommand extends ContainerAwareCommand
2525
{
26+
/**
27+
* {@inheritdoc}
28+
*/
29+
public function isEnabled()
30+
{
31+
if (!$this->getContainer()->has('security.acl.dbal.connection')) {
32+
return false;
33+
}
34+
35+
return parent::isEnabled();
36+
}
37+
2638
/**
2739
* {@inheritdoc}
2840
*/

0 commit comments

Comments
 (0)