use dcNsProcess

This commit is contained in:
Jean-Christian Paul Denis 2023-03-21 20:51:47 +01:00
parent 9df925901f
commit e9886ee444
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -16,6 +16,7 @@ namespace Dotclear\Plugin\tinyPacker;
/* dotclear */ /* dotclear */
use dcCore; use dcCore;
use dcNsProcess;
use dcPage; use dcPage;
/* clearbricks */ /* clearbricks */
@ -33,23 +34,18 @@ use Exception;
* *
* Add action and button to modules lists. * Add action and button to modules lists.
*/ */
class Backend class Backend extends dcNsProcess
{ {
private static $init = false;
public static function init(): bool public static function init(): bool
{ {
if (defined('DC_CONTEXT_ADMIN')) { static::$init = defined('DC_CONTEXT_ADMIN') && dcCOre::app()->auth->isSuperAdmin();
dcPage::checkSuper();
self::$init = true;
}
return self::$init; return static::$init;
} }
public static function process(): bool public static function process(): bool
{ {
if (!self::$init) { if (!static::$init) {
return false; return false;
} }