public function isAllowed(Authenticatable $user = null): bool
    {
        $user = $user ?: Auth::user();

        foreach ($this->authorizationStack as $auth) {
            if (is_callable($auth)) {
                if (!$auth($user)) {
                    return false;
                }
            } elseif ($user && $user->cannot($auth)) {
                return false;
            }
        }

        return true;
    }