summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/acl/Acl.cpp
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2008-11-06 20:07:14 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2008-11-06 20:07:14 +0000
commite1132d45340a4d1c91648cac856803428d2a60f4 (patch)
tree5109e258e838c67371d762fd73240f777efa2c50 /cpp/src/qpid/acl/Acl.cpp
parentee4d8230649fa7ebb5a8688b7a5fdc7da519f1f7 (diff)
downloadqpid-python-e1132d45340a4d1c91648cac856803428d2a60f4.tar.gz
Removed the --enforce-acl option. Instead if a policy file is specified acl will be enabled.
Also removed Route from the Object list and did a bit of code cleanup. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711957 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/acl/Acl.cpp')
-rw-r--r--cpp/src/qpid/acl/Acl.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/cpp/src/qpid/acl/Acl.cpp b/cpp/src/qpid/acl/Acl.cpp
index ff1d4b066b..238ab9df6c 100644
--- a/cpp/src/qpid/acl/Acl.cpp
+++ b/cpp/src/qpid/acl/Acl.cpp
@@ -64,28 +64,26 @@ Acl::Acl (AclValues& av, broker::Broker& b): aclValues(av), broker(&b), transfer
bool Acl::authorise(const std::string& id, const Action& action, const ObjectType& objType, const std::string& name, std::map<Property, std::string>* params)
{
- if (!aclValues.enforce) return true;
boost::shared_ptr<AclData> dataLocal = data; //rcu copy
-
- // add real ACL check here...
+
+ // add real ACL check here...
AclResult aclreslt = dataLocal->lookup(id,action,objType,name,params);
-
-
- return result(aclreslt, id, action, objType, name);
+
+
+ return result(aclreslt, id, action, objType, name);
}
bool Acl::authorise(const std::string& id, const Action& action, const ObjectType& objType, const std::string& ExchangeName, const std::string& RoutingKey)
{
- if (!aclValues.enforce) return true;
boost::shared_ptr<AclData> dataLocal = data; //rcu copy
-
+
// only use dataLocal here...
- AclResult aclreslt = dataLocal->lookup(id,action,objType,ExchangeName,RoutingKey);
-
- return result(aclreslt, id, action, objType, ExchangeName);
+ AclResult aclreslt = dataLocal->lookup(id,action,objType,ExchangeName,RoutingKey);
+
+ return result(aclreslt, id, action, objType, ExchangeName);
}
-
+
bool Acl::result(const AclResult& aclreslt, const std::string& id, const Action& action, const ObjectType& objType, const std::string& name)
{
switch (aclreslt)