fix permissions

master
Jean-Christian Paul Denis 2022-12-03 15:59:20 +01:00
parent 50cc374a61
commit 13bf194e61
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
3 changed files with 6 additions and 9 deletions

View File

@ -240,13 +240,10 @@ class adminPeriodical
'url' => dcCore::app()->adminurl->get('admin.plugin.periodical'),
'small-icon' => dcPage::getPF('periodical/icon.svg'),
'large-icon' => dcPage::getPF('periodical/icon.svg'),
'permissions' => dcCore::app()->auth->check(
dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_USAGE,
dcAuth::PERMISSION_CONTENT_ADMIN,
]),
dcCore::app()->blog->id
),
'permissions' => dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_USAGE,
dcAuth::PERMISSION_CONTENT_ADMIN,
]),
]);
}

View File

@ -226,7 +226,7 @@ class periodical
$params['sql'] .= 'AND T.periodical_id ' . $this->con->in($params['periodical_id']);
unset($params['periodical_id']);
}
if (dcCore::app()->auth->check(dcAuth::PERMISSION_ADMIN, dcCore::app()->blog->id)) {
if (dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_ADMIN]), dcCore::app()->blog->id)) {
if (isset($params['post_status'])) {
if ($params['post_status'] != '') {
$params['sql'] .= 'AND P.post_status = ' . (int) $params['post_status'] . ' ';

View File

@ -172,7 +172,7 @@ class adminPeriodicalList extends adminGenericList
private function postLine($checked)
{
if (dcCore::app()->auth->check(dcAuth::PERMISSION_CATEGORIES, dcCore::app()->blog->id)) {
if (dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CATEGORIES]), dcCore::app()->blog->id)) {
$cat_link = '<a href="category.php?id=%s">%s</a>';
} else {
$cat_link = '%2$s';