docs: private boolean checkDestinationAccess(
      DestinationHandler destination,
      String discriminator,
      String userId)
      throws SIDiscriminatorSyntaxException {
      if (tc.isEntryEnabled())
        SibTr.entry(
          tc,
          "checkDestinationAccess",
          new Object[] { destination, discriminator, userId });
  
      boolean allowed = true;
  
      // Map a null userid to an empty string
      if (userId == null) {
        userId = ""; // Empty string means those users that have not
        // been authenticated, but who are still, of course,
        // members of EVERYONE. 
      }
  
      // We use the userid flavour of security context as we need
      // to drive the userid flavour of the sib.security checkDestinationAccess
      // which is attuned for access checks for messages from foreign buses.
      SecurityContext secContext = new SecurityContext(userId, discriminator);
  
      // Check authority to access the destination    
      if (!destination
        .checkDestinationAccess(secContext, OperationType.RECEIVE)) 
      {
        if (tc.isDebugEnabled())
          SibTr.debug(
            tc,
            "checkDestinationAccess",
            "not authorized to produce to this destination");
  
        // Build the message for the Exception and the Notification
        String nlsMessage = 
        nls_cwsik.getFormattedMessage("DELIVERY_ERROR_SIRC_18", // USER_NOT_AUTH_SEND_ERROR_CWSIP0306
                                      new Object[] { destination.getName(), 
                                                     userId },
                                      null); 
                                      
        // Fire a Notification if Eventing is enabled
        iProxyHandler.
          getMessageProcessor().
          getAccessChecker().
          fireDestinationAccessNotAuthorizedEvent(destination.getName(),
                                          userId,
                                          OperationType.RECEIVE,
                                          nlsMessage);
  
        // sib.security will audit this
        allowed = false;
      }
  
      // Check authority to produce to discriminator
      if (allowed) {
        // If the discriminator is non-wildcarded, we can check authority to consume on
        // the discriminator.
        if (discriminator != null
          && !iProxyHandler
            .getMessageProcessor()
            .getMessageProcessorMatching()
            .isWildCarded(discriminator)) 
        {
          if (!destination
            .checkDiscriminatorAccess(secContext, OperationType.RECEIVE)) 
          {
            if (tc.isDebugEnabled())
              SibTr.debug(
                tc,
                "checkDestinationAccess",
                "not authorized to produce to this discriminator");
  
            // Write an audit record if access is denied
            SibTr
              .audit(
                tc,
                nls_cwsik
                  .getFormattedMessage("DELIVERY_ERROR_SIRC_20",
            // USER_NOT_AUTH_SEND_ERROR_CWSIP0308
            new Object[] {
              destination.getName(),
              discriminator,
              userId },
              null));
  
            allowed = false;
          }
        }
      }
  
      if (tc.isEntryEnabled())
        SibTr.exit(tc, "checkDestinationAccess", new Boolean(allowed));
      return allowed;
    }