private function addBundlesRights(array $config, UserSecurityIdentity $securityIdentity)
    {
        $rights = $this->getActionsOnResources($config);
        foreach ((array) $rights as $resource => $actions) {
            if ('all' === $resource) {
                foreach ($this->bbapp->getBundles() as $bundle) {
                    $this->addObjectAcl($bundle, $securityIdentity, $actions);
                }
                $this->writeln(sprintf('    - Setting [%s] on all bundles', implode(', ', $actions)), OutputInterface::VERBOSITY_DEBUG);
                continue;
            }

            if (null === $bundle = $this->bbapp->getBundle($resource)) {
                $this->writeln(sprintf('    - Unknown bundle `%s`', $resource), OutputInterface::VERBOSITY_DEBUG);
                continue;
            }

            $this->addObjectAcl($bundle, $securityIdentity, $actions);
            $this->writeln(sprintf('    - Setting [%s] on all bundle `%s`', implode(', ', $actions), $resource), OutputInterface::VERBOSITY_DEBUG);
        }
    }