/* */
/* 280 */ boolean isQueue = jbd.isQueue();
/* 281 */ String name = jbd.getName();
/* */
/* 283 */ SecurityStore sm = conn.getSecurityManager();
/* 284 */ SecurityMetadata securityMetadata = sm.getSecurityMetadata(isQueue, name);
/* */
/* 286 */ if (securityMetadata == null)
/* */ {
/* 288 */ throw new JMSSecurityException("No security configuration avaliable for " + name);
/* */ }
/* */
/* 296 */ sm.authenticate(conn.getUsername(), conn.getPassword());
/* */
/* 299 */ Set principals = checkType == CheckType.WRITE ? securityMetadata.getWritePrincipals() : checkType == CheckType.READ ? securityMetadata.getReadPrincipals() : securityMetadata.getCreatePrincipals();
/* */ try
/* */ {
/* 304 */ if (!sm.authorize(conn.getUsername(), principals, checkType))
/* */ {
/* 306 */ String msg = "User: " + conn.getUsername() + " is not authorized to " + (checkType == CheckType.WRITE ? "write to" : checkType == CheckType.READ ? "read from" : "create durable sub on") + " destination " + name;