Skip to content

Commit

Permalink
コンテンツ管理 権限チェック調整 (#3743)
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 authored Sep 17, 2024
1 parent f3fed06 commit 526fe3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 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 @@ -138,7 +139,8 @@ public function isActionAvailable($type, $action, $entityId)
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 526fe3a

Please sign in to comment.