summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/Broker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qpid/broker/Broker.cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/Broker.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/broker/Broker.cpp b/qpid/cpp/src/qpid/broker/Broker.cpp
index 2770c9d66b..dd2769ec92 100644
--- a/qpid/cpp/src/qpid/broker/Broker.cpp
+++ b/qpid/cpp/src/qpid/broker/Broker.cpp
@@ -355,6 +355,11 @@ Broker::Broker(const Broker::Options& conf) :
//recover any objects via object factories
objects.restore(*this);
+ // Assign to queues their users who created them (can be done after ACL is loaded in Plugin::initializeAll above
+ if ((getAcl()) && (store.get())) {
+ queues.eachQueue(boost::bind(&qpid::broker::Queue::updateAclUserQueueCount, _1));
+ }
+
if(conf.enableMgmt) {
if (getAcl()) {
mgmtObject->set_maxConns(getAcl()->getMaxConnectTotal());
@@ -1289,8 +1294,9 @@ std::pair<boost::shared_ptr<Queue>, bool> Broker::createQueue(
if (!acl->authorise(userId,acl::ACT_CREATE,acl::OBJ_QUEUE,name,&params) )
throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied queue create request from " << userId));
- if (!acl->approveCreateQueue(userId,name) )
- throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied queue create request from " << userId));
+ if (!queues.find(name))
+ if (!acl->approveCreateQueue(userId,name) )
+ throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied queue create request from " << userId));
}
Exchange::shared_ptr alternate;