Skip to content

Commit

Permalink
コンテンツ管理 権限チェック調整
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 committed Aug 26, 2024
1 parent cf33227 commit 3804f35
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Baser/View/Helper/BcContentsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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']);
}

/**
Expand Down

0 comments on commit 3804f35

Please sign in to comment.