diff options
Diffstat (limited to 'apps/files_external/lib/AppInfo/Application.php')
-rw-r--r-- | apps/files_external/lib/AppInfo/Application.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php index aa14772bae0..47c88a67d20 100644 --- a/apps/files_external/lib/AppInfo/Application.php +++ b/apps/files_external/lib/AppInfo/Application.php @@ -64,6 +64,7 @@ use OCA\Files_External\Service\BackendService; use OCP\AppFramework\App; use OCP\AppFramework\IAppContainer; use OCP\Files\Config\IUserMountCache; +use OCP\IGroup; use OCP\IUser; use Symfony\Component\EventDispatcher\GenericEvent; @@ -111,6 +112,16 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide $config->modifyMountsOnUserDelete($user->getUID()); } ); + $dispatcher->addListener( + IGroup::class . '::postDelete', + function (GenericEvent $event) { + /** @var IGroup $group */ + $group = $event->getSubject(); + /** @var DBConfigService $config */ + $config = $this->getContainer()->query(DBConfigService::class); + $config->modifyMountsOnGroupDelete($group->getGID()); + } + ); } /** |