From fe6c9a520bb1d48565ba50df5ca95a83715dda49 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 3 Dec 2022 16:59:27 +0100 Subject: [PATCH] fix permissions --- _admin.php | 2 +- _define.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/_admin.php b/_admin.php index 3519c9f..7e7556a 100644 --- a/_admin.php +++ b/_admin.php @@ -14,7 +14,7 @@ if (!defined('DC_CONTEXT_ADMIN')) { return null; } -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)) { return null; } diff --git a/_define.php b/_define.php index 943cb9c..64b8985 100644 --- a/_define.php +++ b/_define.php @@ -21,7 +21,9 @@ $this->registerModule( '2022.11.28', [ 'requires' => [['core', '2.24']], - 'permissions' => dcAuth::PERMISSION_ADMIN, + 'permissions' => dcCore::app()->auth->makePermissions([ + dcAuth::PERMISSION_ADMIN, + ]), 'type' => 'plugin', 'support' => 'https://github.com/JcDenis/postslistOptions', 'details' => 'https://plugins.dotaddict.org/dc2/details/postslistOptions',