From e1132d45340a4d1c91648cac856803428d2a60f4 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Thu, 6 Nov 2008 20:07:14 +0000 Subject: 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 --- cpp/src/qpid/acl/Acl.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'cpp/src/qpid/acl/Acl.cpp') 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* params) { - if (!aclValues.enforce) return true; boost::shared_ptr 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 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) -- cgit v1.2.1