private boolean checkConsumerDiscriminatorAccess ( DestinationHandler destination , String discriminator , SecurityContext secContext ) throws SIDiscriminatorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkConsumerDiscriminatorAccess" , new Object [ ] { destination , discriminator , secContext } ) ; boolean allowed = true ; // If the discriminator is non-wildcarded, we can check authority to consume on // the discriminator. if ( discriminator != null && ! _messageProcessor . getMessageProcessorMatching ( ) . isWildCarded ( discriminator ) ) { // set the discriminator into the security context secContext . setDiscriminator ( discriminator ) ; if ( ! destination . checkDiscriminatorAccess ( secContext , OperationType . RECEIVE ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkConsumerDiscriminatorAccess" , "not authorized to consume from this destination's discriminator" ) ; // Write an audit record if access is denied SibTr . audit ( tc , nls . getFormattedMessage ( "USER_NOT_AUTH_RECEIVE_ERROR_CWSIP0310" , new Object [ ] { destination . getName ( ) , discriminator , secContext . getUserName ( false ) } , null ) ) ; allowed = false ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkConsumerDiscriminatorAccess" , Boolean . valueOf ( allowed ) ) ; return allowed ; }
Checks the authority of a consumer to consume from a discriminator