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']); } /**