Core/Framework/Amvc/Controller/Controller.php
protected function checkControllerAccess($force = false): bool
    {
        // Is there an global access method in the app main class to call?
        if (method_exists($this->app, 'Access') && $this->app->Access() === false) {
            return false;
        }

        // No ACL
        if (empty($this->access)) {
            return true;
        }

        $perm = [];

        // Global access for all actions?
        if (array_key_exists('*', $this->access)) {
            if (!is_array($this->access['*'])) {
                $this->access['*'] = (array) $this->access['*'];
            }

            $perm += $this->access['*'];
        }
        else {

            // ACL exists but action not in it? This means to grant access.
            if (!array_key_exists($this->action, $this->access)) {
                return true;
            }
        }

        // Actions access set?
        if (isset($this->access[$this->action])) {
            if (!is_array($this->access[$this->action])) {
                $this->access[$this->action] = (array) $this->access[$this->action];
            }

            $perm += $this->access[$this->action];
        }

        // Check the permissions against the current user
        if ($perm) {
            return $this->checkAccess($perm);
        }

        return false;
    }
protected function checkControllerAccess($force = false): bool
    {
        // Is there an global access method in the app main class to call?
        if (method_exists($this->app, 'Access') && $this->app->Access() === false) {
            return false;
        }

        // No ACL
        if (empty($this->access)) {
            return true;
        }

        $perm = [];

        // Global access for all actions?
        if (array_key_exists('*', $this->access)) {
            if (!is_array($this->access['*'])) {
                $this->access['*'] = (array) $this->access['*'];
            }

            $perm += $this->access['*'];
        }
        else {

            // ACL exists but action not in it? This means to grant access.
            if (!array_key_exists($this->action, $this->access)) {
                return true;
            }
        }

        // Actions access set?
        if (isset($this->access[$this->action])) {
            if (!is_array($this->access[$this->action])) {
                $this->access[$this->action] = (array) $this->access[$this->action];
            }

            $perm += $this->access[$this->action];
        }

        // Check the permissions against the current user
        if ($perm) {
            return $this->checkAccess($perm);
        }

        return false;
    }
protected function checkControllerAccess ( $ force = false ) : bool { // Is there an global access method in the app main class to call? if ( method_exists ( $ this -> app , 'Access' ) && $ this -> app -> Access ( ) === false ) { return false ; } // No ACL if ( empty ( $ this -> access ) ) { return true ; } $ perm = [ ] ; // Global access for all actions? if ( array_key_exists ( '*' , $ this -> access ) ) { if ( ! is_array ( $ this -> access [ '*' ] ) ) { $ this -> access [ '*' ] = ( array ) $ this -> access [ '*' ] ; } $ perm += $ this -> access [ '*' ] ; } else { // ACL exists but action not in it? This means to grant access. if ( ! array_key_exists ( $ this -> action , $ this -> access ) ) { return true ; } } // Actions access set? if ( isset ( $ this -> access [ $ this -> action ] ) ) { if ( ! is_array ( $ this -> access [ $ this -> action ] ) ) { $ this -> access [ $ this -> action ] = ( array ) $ this -> access [ $ this -> action ] ; } $ perm += $ this -> access [ $ this -> action ] ; } // Check the permissions against the current user if ( $ perm ) { return $ this -> checkAccess ( $ perm ) ; } return false ; }
Checks the controller access of the user

This accesscheck works on serveral levels.

Level 0 - App: Tries to check access on possible app wide access function.
Level 1 - Controller: Tries to check access by looking for access setting in the controller itself.

@param bool $force
Set this to true if you want to force a brutal stop

@return boolean
Checks the controller access of the user