From a0ee5743e558beb713393f167085f2725d2ab954 Mon Sep 17 00:00:00 2001 From: nate Date: Mon, 9 Oct 2006 15:47:50 +0000 Subject: [PATCH] Allowing user to specify database for ACL tables. (Ticket #1508) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3610 3807eeeb-6ff5-0310-8944-8be069107fe0 --- app/config/core.php | 1 + cake/libs/controller/components/dbacl/db_acl.php | 3 +++ cake/libs/controller/components/dbacl/models/aclnode.php | 3 +++ cake/libs/controller/components/dbacl/models/aros_aco.php | 2 ++ 4 files changed, 9 insertions(+) diff --git a/app/config/core.php b/app/config/core.php index 6de3d435c..a81571d3a 100644 --- a/app/config/core.php +++ b/app/config/core.php @@ -140,4 +140,5 @@ */ define('ACL_CLASSNAME', 'DB_ACL'); define('ACL_FILENAME', 'dbacl' . DS . 'db_acl'); + define('ACL_DATABASE', 'default'); ?> \ No newline at end of file diff --git a/cake/libs/controller/components/dbacl/db_acl.php b/cake/libs/controller/components/dbacl/db_acl.php index 4c1b33cf0..d7df58762 100644 --- a/cake/libs/controller/components/dbacl/db_acl.php +++ b/cake/libs/controller/components/dbacl/db_acl.php @@ -27,6 +27,9 @@ * @lastmodified $Date$ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ +if (!defined('ACL_DATABASE')) { + define('ACL_DATABASE', 'default'); +} uses('controller' . DS . 'components' . DS . 'acl_base'); uses('controller' . DS . 'components' . DS . 'dbacl' . DS . 'models' . DS . 'aclnode'); diff --git a/cake/libs/controller/components/dbacl/models/aclnode.php b/cake/libs/controller/components/dbacl/models/aclnode.php index b0acffbea..1e38bb68b 100644 --- a/cake/libs/controller/components/dbacl/models/aclnode.php +++ b/cake/libs/controller/components/dbacl/models/aclnode.php @@ -36,6 +36,9 @@ * */ class AclNode extends AppModel { + + var $useDbConfig = ACL_DATABASE; + var $cacheQueries = false; /** * Creates a new ARO/ACO node diff --git a/cake/libs/controller/components/dbacl/models/aros_aco.php b/cake/libs/controller/components/dbacl/models/aros_aco.php index 93172bc23..92b401dca 100644 --- a/cake/libs/controller/components/dbacl/models/aros_aco.php +++ b/cake/libs/controller/components/dbacl/models/aros_aco.php @@ -38,6 +38,8 @@ */ class ArosAco extends AppModel { + + var $useDbConfig = ACL_DATABASE; /** * Enter description here... *