diff options
author | Charles E. Rolke <chug@apache.org> | 2012-08-24 21:50:59 +0000 |
---|---|---|
committer | Charles E. Rolke <chug@apache.org> | 2012-08-24 21:50:59 +0000 |
commit | 6298f81a7806ea18c824d06cf4a82e2e8c985e21 (patch) | |
tree | 4eb13299df06035951a783b48c816efc2d8c9655 /cpp/src/qpid/acl/AclData.cpp | |
parent | 5e2bf94acf89aa0b57f934cc042ae999c1b4b73d (diff) | |
download | qpid-python-6298f81a7806ea18c824d06cf4a82e2e8c985e21.tar.gz |
QPID-4249 TopicExchange binding lookup for all routing keys
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1377130 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/acl/AclData.cpp')
-rw-r--r-- | cpp/src/qpid/acl/AclData.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/cpp/src/qpid/acl/AclData.cpp b/cpp/src/qpid/acl/AclData.cpp index 6994de2898..ac97e53b14 100644 --- a/cpp/src/qpid/acl/AclData.cpp +++ b/cpp/src/qpid/acl/AclData.cpp @@ -241,14 +241,31 @@ namespace acl { default: bool result; if ((SPECPROP_ALTERNATE == rulePropMapItr->first && rsItr->ruleHasUserSub[PROP_ALTERNATE]) || - (SPECPROP_ROUTINGKEY == rulePropMapItr->first && rsItr->ruleHasUserSub[PROP_ROUTINGKEY]) || (SPECPROP_QUEUENAME == rulePropMapItr->first && rsItr->ruleHasUserSub[PROP_QUEUENAME])) { // These properties are allowed to have username substitution std::string sName(rulePropMapItr->second); substituteUserId(sName, id); result = matchProp(sName, lookupParamItr->second); - } else { + } + else if (SPECPROP_ROUTINGKEY == rulePropMapItr->first) + { + // Routing key is allowed to have username substitution + // and it gets topic exchange matching + if (rsItr->ruleHasUserSub[PROP_ROUTINGKEY]) + { + std::string sKey(lookupParamItr->second); + substituteKeywords(sKey, id); + result = rsItr->matchRoutingKey(sKey); + } + else + { + result = rsItr->matchRoutingKey(lookupParamItr->second); + } + } + else + { + // Rules without substitution result = matchProp(rulePropMapItr->second, lookupParamItr->second); } |