We bypass the normal auth method and give the current user Super User rights.
This should be very carefully used.

@param bool $bool
551626
public function setSuperUserAccess($bool = true)
    {
        $this->hasSuperUserAccess = (bool) $bool;

        if ($bool) {
            $this->makeSureLoginNameIsSet();
        } else {
            $this->resetSites();
        }
    }
464436
public function caching($bool = null)
	{
		if (is_bool($bool))
		{
			$this->_config['enable_cache'] = $bool;
			return $this;
		}
		return \Arr::get($this->_config, 'enable_cache', true);
	}
1109685
public function when($value, $true_call, $false_call = null)
    {
        if ($value) {
            $true_call($this, $value);
        } elseif ($false_call) {
            $false_call($this, $value);
        }

        return $this;
    }
521095
public function setRunAsDaemon($boolean)
    {
        $this->_runasdaemon = (bool) $boolean;
        ignore_user_abort($this->_runasdaemon);
        return $this->_runasdaemon;
    }
950544
private static function encodeBoolean($bool)
    {
        if ($bool)
        {
            return self::encodeFirstByte(MajorType::SIMPLE_AND_FLOAT, AdditionalType::SIMPLE_TRUE);
        }
        else
        {
            return self::encodeFirstByte(MajorType::SIMPLE_AND_FLOAT, AdditionalType::SIMPLE_FALSE);
        }
    }
661690
public function rule_bool($a)
    {
        // We don't use PHP inbuilt test - a bit restrictive

        // Changes PHP true/false to 1, 0
        $a = strtolower($a);

        $vals = array('true', 'false', 't', 'f', 1, 0, 'yes', 'no', 'y', 'n');

        if (!in_array($a, $vals)) {
            return $this->fail('Must be a boolean value');
        }
    }
1305773
public function setKeepalive($bool)
    {
        $this->keepalive = (bool)$bool;
        $this->setOption(\EventUtil::SOL_SOCKET, \EventUtil::SO_KEEPALIVE, $this->keepalive ? true : false);
    }
1373363
function sync_users($do_updates=true) {
        if (empty($this->config->host_url)) {
            error_log('[AUTH CAS] '.get_string('noldapserver', 'auth_cas'));
            return;
        }
        parent::sync_users($do_updates);
    }
475840
protected function _setCurrentUser($user = null)
    {
        if ($user === null && !empty($this->Auth)) {
            $user = $this->Auth->user();
        }

        if (!$user) {
            return false;
        }

        $this->_currentUserInstance = $this->_getUserInstance($user);

        return $this->_currentUserInstance;
    }
264585
public static function setIsDebug(bool $bool): void
    {
        if (self::isCliApp()) {
            self::$IS_DEBUG = $bool;
        } else {
            MSession::set(MCoreApplication::DEBUG, $bool);
        }
    }
337991
public function setBusy($bool = true)
    {
        $this->busyCounter = 0;
        $this->isBusy = (bool)$bool;
        if ($bool) {
            $text = "Please wait...";
            if (is_string($bool)) {
                $text = (string)$bool;
            }
            $lbl = Label::create();
            $lbl->setText($text)->setTextColor("fff")->setTextSize(6)
                ->setSize(90, 12)->setAlign("center", "center")
                ->setPosition($this->busyFrame->getWidth() / 2, -($this->busyFrame->getHeight() / 2));

            $this->busyFrame->addChild($lbl);
            $quad = Quad::create();
            $quad->setStyles("Bgs1", "BgDialogBlur");
            $quad->setBackgroundColor("f00")->setSize($this->busyFrame->getWidth(), $this->busyFrame->getHeight());
            $this->busyFrame->addChild($quad);
        } else {
            $this->busyFrame->removeAllChildren();
        }
    }
718997
public function showToday($bool = null)
    {
        if (isset($bool)) {

            $this->option_show_today = is_bool($bool) ? $bool : false;
            $this->set_options['show_today'] = 'showToday';

            return $this;
        }
        else {

            return $this->option_show_today;
        }
    }
15161
public function login($user, $password, $tryApop = true)
    {
        if ($tryApop && $this->_timestamp) {
            try {
                $this->request("APOP $user ".md5($this->_timestamp.$password));
                return;
            } catch (\Exception $e) {
                // ignore
            }
        }

        $this->request("USER $user");
        $this->request("PASS $password");
    }
1107529
public function noReset($bool = false)
	{
		if (is_bool($bool)) {
			$this->noReset = $bool;
		} else {
			throw new RuntimeException('Invalid parameter type setted, expected boolean, got ' . gettype($bool));
		}
	}
304295
public function allowCredentials($bool = true)
    {
        $this->response = $this->corsHandler->setResponse($this->response)
            ->allowCredentials($bool)
            ->getResponse();

        return $this;
    }
953880
public static function backtrace($bool = false)
    {
        if (Daemon::$obInStack || $bool) {
            try {
                throw new \Exception;
            } catch (\Exception $e) {
                $trace = $e->getTraceAsString();
                $e = explode("\n", $trace);
                array_shift($e);
                array_shift($e);
                return implode("\n", $e);
            }
        }
        ob_start();
        debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
        $trace = ob_get_contents();
        ob_end_clean();

        $e = explode("\n", $trace);
        array_shift($e);
        return implode("\n", $e);
    }
661039
public function setSatisfied($bool = true)
    {
        $storage = $this->getStorage()->read() ?: [];
        $storage['is_satisfied'] = $bool;
        $this->getStorage()->write($storage);

        return $this;
    }