Skip to content

Commit

Permalink
コンテンツ管理 権限チェック調整
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 committed Sep 13, 2024
1 parent cf33227 commit e3c446f
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 e3c446f

Please sign in to comment.