fix permissions

This commit is contained in:
Jean-Christian Paul Denis 2022-11-30 22:34:52 +01:00
parent ede4975b86
commit 3acb671855
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
2 changed files with 6 additions and 2 deletions

View File

@ -25,7 +25,9 @@ dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
'/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.activityReport')) . '(&.*)?$/', '/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.activityReport')) . '(&.*)?$/',
$_SERVER['REQUEST_URI'] $_SERVER['REQUEST_URI']
), ),
dcCore::app()->auth->check(dcAuth::PERMISSION_ADMIN, dcCore::app()->blog->id) dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_ADMIN,
]), dcCore::app()->blog->id)
); );
if (dcCore::app()->activityReport->getSetting('active')) { if (dcCore::app()->activityReport->getSetting('active')) {

View File

@ -18,7 +18,9 @@ if (!defined('ACTIVITY_REPORT_V2')) {
return null; return null;
} }
dcPage::check(dcAuth::PERMISSION_ADMIN); dcPage::check(dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_ADMIN,
]));
$super = dcCore::app()->auth->isSuperAdmin() && !empty($_REQUEST['super']); $super = dcCore::app()->auth->isSuperAdmin() && !empty($_REQUEST['super']);