diff --git a/Command/PluginRegisterCommand.php b/Command/PluginRegisterCommand.php index 80fc83a..f77c88e 100644 --- a/Command/PluginRegisterCommand.php +++ b/Command/PluginRegisterCommand.php @@ -67,6 +67,10 @@ protected function execute(InputInterface $input, OutputInterface $output) $output->write(' - Refresh plugin cache.'); $installer->refreshInstalledPluginConfiguration(); $output->writeln($executed ? ' <info>[Ok]</info>' : ' <info>[Ignore]</info>'); + + $output->write(' - Refresh default roles.'); + $installer->refreshDefaultRoles(); + $output->writeln(' <info>[Ok]</info>'); $output->writeln("<info>Finished!</info>\n"); } diff --git a/Command/PluginRemoveCommand.php b/Command/PluginRemoveCommand.php index 5a3cc47..3d1e82e 100644 --- a/Command/PluginRemoveCommand.php +++ b/Command/PluginRemoveCommand.php @@ -38,6 +38,10 @@ protected function execute(InputInterface $input, OutputInterface $output) $output->write(' - Refresh plugin cache.'); $register->refreshInstalledPluginConfiguration(); $output->writeln('<info>[Ok]</info>'); + + $output->write(' - Refresh default roles.'); + $installer->refreshDefaultRoles(); + $output->writeln(' <info>[Ok]</info>'); $output->writeln("<info>Finished!</info>\n"); } diff --git a/System/PluginRegister.php b/System/PluginRegister.php index 248323d..7f61e06 100644 --- a/System/PluginRegister.php +++ b/System/PluginRegister.php @@ -126,6 +126,11 @@ public function refreshInstalledPluginConfiguration() $this->refreshInstalledPluginRouting($installeds); } + public function refreshDefaultRoles() + { + $plugins = $this->biz->service('Role:RoleService')->refreshRoles(); + } + protected function refreshInstalledPluginRouting($plugins) { $fs = new Filesystem();