fix init check
This commit is contained in:
parent
d582de5d71
commit
a989f790fd
@ -21,16 +21,14 @@ class Backend extends dcNsProcess
|
||||
{
|
||||
public static function init(): bool
|
||||
{
|
||||
if (defined('DC_CONTEXT_ADMIN')) {
|
||||
self::$init = dcCore::app()->auth->isSuperAdmin();
|
||||
}
|
||||
static::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->isSuperAdmin();
|
||||
|
||||
return self::$init;
|
||||
return static::$init;
|
||||
}
|
||||
|
||||
public static function process(): bool
|
||||
{
|
||||
if (!self::$init) {
|
||||
if (!static::$init) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user