From 3804f354704d505156325ab01bcaf935461698de Mon Sep 17 00:00:00 2001 From: seto Date: Mon, 26 Aug 2024 16:47:18 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=86=E3=83=B3=E3=83=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20=E6=A8=A9=E9=99=90=E3=83=81=E3=82=A7?= =?UTF-8?q?=E3=83=83=E3=82=AF=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Baser/View/Helper/BcContentsHelper.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Baser/View/Helper/BcContentsHelper.php b/lib/Baser/View/Helper/BcContentsHelper.php index 5db42b2387..b433d280a9 100644 --- a/lib/Baser/View/Helper/BcContentsHelper.php +++ b/lib/Baser/View/Helper/BcContentsHelper.php @@ -115,7 +115,8 @@ public function setup() } // disabled if(!empty($setting['url']['add'])) { - $setting['addDisabled'] = !($this->_Permission->check($setting['url']['add'], $user['user_group_id'])); + $permissionCheckUrl = preg_replace("@\A{$this->request->base}@", '', $setting['url']['add']); + $setting['addDisabled'] = !($this->_Permission->check($permissionCheckUrl, $user['user_group_id'])); } else { $setting['addDisabled'] = true; } @@ -137,8 +138,8 @@ public function isActionAvailable($type, $action, $entityId) if (!isset($this->settings[$type]['url'][$action])) { return false; } - $url = $this->settings[$type]['url'][$action] . '/' . $entityId; - return $this->_Permission->check($url, $user['user_group_id']); + $permissionCheckUrl = preg_replace("@\A{$this->request->base}@", '', $url); + return $this->_Permission->check($permissionCheckUrl, $user['user_group_id']); } /**