code: def _has_access_no_details(
      is_authorized_callback: Callable[[], bool]
  ) -> Callable[[T], T]:
      """
      Check current user's permissions against required permissions.
  
      This works only for resources with no details. This function is used in some ``has_access_`` functions
      below.
  
      :param is_authorized_callback: callback to execute to figure whether the user is authorized to access
          the resource?
      """
  
      def has_access_decorator(func: T):
          @wraps(func)
          def decorated(*args, **kwargs):
              return _has_access(
                  is_authorized=is_authorized_callback(),
                  func=func,
                  args=args,
                  kwargs=kwargs,
              )
  
          return cast(T, decorated)
  
      return has_access_decorator
  
imports: from __future__ import annotations
  import functools
  import logging
  import warnings
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, Sequence, TypeVar, cast
  from flask import flash, redirect, render_template, request, url_for
  from flask_appbuilder._compat import as_unicode
  from flask_appbuilder.const import FLAMSG_ERR_SEC_ACCESS_DENIED, LOGMSG_ERR_SEC_ACCESS_DENIED, PERMISSION_PREFIX
  from airflow.auth.managers.models.resource_details import AccessView, ConnectionDetails, DagAccessEntity, DagDetails, PoolDetails, VariableDetails
  from airflow.configuration import conf
  from airflow.exceptions import RemovedInAirflow3Warning
  from airflow.utils.net import get_hostname
  from airflow.www.extensions.init_auth_manager import get_auth_manager
label_desc: Use image node_id 4 for calling a global function with example usage: _has_access_no_details(is_authorized_callback) and returns: has_access_decorator, cast, _has_access