use dcNsProcess
parent
9df925901f
commit
e9886ee444
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue