From 4d41246e54347c80d2de4682988eef7dcf85af19 Mon Sep 17 00:00:00 2001 From: cu-akasakay Date: Fri, 28 Feb 2025 06:43:27 +0900 Subject: [PATCH] =?UTF-8?q?fix=20#3990=20=E3=83=97=E3=83=A9=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=92=E7=84=A1=E5=8A=B9=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=A6=E5=86=8D=E5=BA=A6=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=81=99=E3=82=8B=E3=81=A8=E3=82=A2=E3=82=AF?= =?UTF-8?q?=E3=82=BB=E3=82=B9=E3=83=AB=E3=83=BC=E3=83=AB=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=8C=E9=87=8D=E8=A4=87=E3=81=97=E3=81=A6=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=82=8B=20(#4132)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../baser-core/src/Controller/Admin/PluginsController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/baser-core/src/Controller/Admin/PluginsController.php b/plugins/baser-core/src/Controller/Admin/PluginsController.php index 95dffa5958..ff6d3ffda3 100644 --- a/plugins/baser-core/src/Controller/Admin/PluginsController.php +++ b/plugins/baser-core/src/Controller/Admin/PluginsController.php @@ -24,6 +24,7 @@ use BaserCore\Annotation\UnitTest; use BaserCore\Annotation\NoTodo; use BaserCore\Annotation\Checked; +use BaserCore\Service\PermissionGroupsServiceInterface; /** * Class PluginsController @@ -200,18 +201,21 @@ public function get_core_update(PluginsAdminServiceInterface $service) * 無効化 * * @param PluginsServiceInterface $service + * @param PermissionGroupsServiceInterface $permissionGroupService * @param string $name プラグイン名 * @checked * @noTodo * @unitTest */ - public function detach(PluginsServiceInterface $service, $name) + public function detach(PluginsServiceInterface $service, PermissionGroupsServiceInterface $permissionGroupService, $name) { if (!$this->request->is('post')) { $this->BcMessage->setError(__d('baser_core', '無効な処理です。')); return $this->redirect(['action' => 'index']); } if ($service->detach(rawurldecode($name))) { + // アクセスルールを削除 + $permissionGroupService->deleteByPlugin($name); $this->BcMessage->setSuccess(sprintf(__d('baser_core', 'プラグイン「%s」を無効にしました。'), rawurldecode($name))); } else { $this->BcMessage->setError(__d('baser_core', 'プラグインの無効化に失敗しました。'));