From ccb7c49b1a2761555cfb975ba1680e55e8352bfb Mon Sep 17 00:00:00 2001 From: zhaolaisong Date: Thu, 1 Mar 2018 16:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=AE=89=E8=A3=85=E5=8D=B8?= =?UTF-8?q?=E8=BD=BD=E6=97=B6=E5=A2=9E=E5=8A=A0=E5=88=B7=E6=96=B0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=9D=83=E9=99=90=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Command/PluginRegisterCommand.php | 4 ++++ Command/PluginRemoveCommand.php | 4 ++++ System/PluginRegister.php | 5 +++++ 3 files changed, 13 insertions(+) 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 ? ' [Ok]' : ' [Ignore]'); + + $output->write(' - Refresh default roles.'); + $installer->refreshDefaultRoles(); + $output->writeln(' [Ok]'); $output->writeln("Finished!\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('[Ok]'); + + $output->write(' - Refresh default roles.'); + $installer->refreshDefaultRoles(); + $output->writeln(' [Ok]'); $output->writeln("Finished!\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();