parameters: (path, config)
return_statement: return False
docstring: Whether we are allowed to load a mozbuild file at the specified path.
  
      This is used as cheap security to ensure the build is isolated to known
      source directories.
  
      We are allowed to read from the main source directory and any defined
      external source directories. The latter is to allow 3rd party applications
      to hook into our build system.
docstring_summary: Whether we are allowed to load a mozbuild file at the specified path.
docstring_tokens: Whether we are allowed to load a mozbuild file at the specified path .
function: def is_read_allowed(path, config):
      """Whether we are allowed to load a mozbuild file at the specified path.
  
      This is used as cheap security to ensure the build is isolated to known
      source directories.
  
      We are allowed to read from the main source directory and any defined
      external source directories. The latter is to allow 3rd party applications
      to hook into our build system.
      """
      assert os.path.isabs(path)
      assert os.path.isabs(config.topsrcdir)
  
      path = mozpath.normpath(path)
      topsrcdir = mozpath.normpath(config.topsrcdir)
  
      if mozpath.basedir(path, [topsrcdir]):
          return True
  
      if config.external_source_dir and \
              mozpath.basedir(path, [config.external_source_dir]):
          return True
  
      return False
function_tokens: def is_read_allowed ( path , config ) : assert os . path . isabs ( path ) assert os . path . isabs ( config . topsrcdir ) path = mozpath . normpath ( path ) topsrcdir = mozpath . normpath ( config . topsrcdir ) if mozpath . basedir ( path , [ topsrcdir ] ) : return True if config . external_source_dir and mozpath . basedir ( path , [ config . external_source_dir ] ) : return True return False