diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2009-09-29 13:49:40 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2009-09-29 13:49:40 +0000 |
| commit | 47f6ea1149cb930d45d1fa14d61563b2c553ccdb (patch) | |
| tree | 9b5a841095eafccdfb5b3f2c7f30e588e7c408f5 /cpp/src/qpid/broker/SessionAdapter.cpp | |
| parent | 7661c82fc7aaca543582ef45582d87de3c5de5b7 (diff) | |
| download | qpid-python-47f6ea1149cb930d45d1fa14d61563b2c553ccdb.tar.gz | |
I have applied the patch attached to QPID-2108 from Tim Platten with a few modifications.
(Please refer to the JIRA for a description of these modifications)
I also fixed the formatting and added more debug loggging for the publish acl lookup method in AclData.cpp
I also added test cases to cover QPID-2108
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@819948 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SessionAdapter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp index a1ad5a0a30..4ee3a97357 100644 --- a/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/cpp/src/qpid/broker/SessionAdapter.cpp @@ -337,6 +337,10 @@ void SessionAdapter::QueueHandlerImpl::declare(const string& name, const string& params.insert(make_pair(acl::PROP_DURABLE, std::string(durable ? _TRUE : _FALSE))); params.insert(make_pair(acl::PROP_EXCLUSIVE, std::string(exclusive ? _TRUE : _FALSE))); params.insert(make_pair(acl::PROP_AUTODELETE, std::string(autoDelete ? _TRUE : _FALSE))); + params.insert(make_pair(acl::PROP_POLICYTYPE, arguments.getAsString("qpid.policy_type"))); + params.insert(make_pair(acl::PROP_MAXQUEUECOUNT, arguments.getAsString("qpid.max_count"))); + params.insert(make_pair(acl::PROP_MAXQUEUESIZE, arguments.getAsString("qpid.max_size"))); + if (!acl->authorise(getConnection().getUserId(),acl::ACT_CREATE,acl::OBJ_QUEUE,name,¶ms) ) throw NotAllowedException(QPID_MSG("ACL denied queue create request from " << getConnection().getUserId())); } @@ -472,8 +476,7 @@ SessionAdapter::MessageHandlerImpl::subscribe(const string& queueName, AclModule* acl = getBroker().getAcl(); if (acl) - { - // add flags as needed + { if (!acl->authorise(getConnection().getUserId(),acl::ACT_CONSUME,acl::OBJ_QUEUE,queueName,NULL) ) throw NotAllowedException(QPID_MSG("ACL denied Queue subscribe request from " << getConnection().getUserId())); } |
