Cake\Controller\Component\AuthComponent::deny PHP Метод

deny() публичный Метод

You can use deny with either an array or a simple string. $this->Auth->deny('view'); $this->Auth->deny(['edit', 'add']); or $this->Auth->deny(); to remove all items from the allowed list
См. также: Cake\Controller\Component\AuthComponent::allow()
public deny ( string | array | null $actions = null ) : void
$actions string | array | null Controller action name or array of actions
Результат void
    public function deny($actions = null)
    {
        if ($actions === null) {
            $this->allowedActions = [];
            return;
        }
        foreach ((array) $actions as $action) {
            $i = array_search($action, $this->allowedActions);
            if (is_int($i)) {
                unset($this->allowedActions[$i]);
            }
        }
        $this->allowedActions = array_values($this->allowedActions);
    }