You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2018/04/11 21:47:40 UTC

qpid-broker-j git commit: QPID-8160: [Broker-J] Ensure that AccessControlException during sending link creation is reported with an amqp:unauthorized-access

Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 768f4fb09 -> 0ec8be159


QPID-8160: [Broker-J] Ensure that AccessControlException during sending link creation is reported with an amqp:unauthorized-access


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/0ec8be15
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/0ec8be15
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/0ec8be15

Branch: refs/heads/master
Commit: 0ec8be159935b6f84675845965b184f1cfa3e8aa
Parents: 768f4fb
Author: Keith Wall <kw...@apache.org>
Authored: Wed Apr 11 22:45:57 2018 +0100
Committer: Keith Wall <kw...@apache.org>
Committed: Wed Apr 11 22:46:23 2018 +0100

----------------------------------------------------------------------
 .../apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/0ec8be15/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
index ab95a32..a69b96a 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
@@ -252,6 +252,10 @@ public class SendingLinkEndpoint extends AbstractLinkEndpoint<Source, Target>
             String msg = "Cannot add a consumer to the destination as the destination has been deleted";
             throw new AmqpErrorException(new Error(AmqpError.RESOURCE_DELETED, msg), e);
         }
+        catch (AccessControlException e)
+        {
+            throw new AmqpErrorException(new Error(AmqpError.UNAUTHORIZED_ACCESS, e.getMessage()));
+        }
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org