fix permissions

This commit is contained in:
Jean-Christian 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')) . '(&.*)?$/',
$_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')) {

View file

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