From ef5eead03806e9bf49d4e60452fca42992d38e2d Mon Sep 17 00:00:00 2001 From: 0x20h Date: Fri, 13 Jan 2012 21:55:47 +0100 Subject: [PATCH] use more appropriate array key when passing options to the adapter --- lib/Cake/Controller/Component/Acl/PhpAcl.php | 4 ++-- lib/Cake/Test/Case/Controller/Component/Acl/PhpAclTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Controller/Component/Acl/PhpAcl.php b/lib/Cake/Controller/Component/Acl/PhpAcl.php index aad12ae19..d62d27c91 100644 --- a/lib/Cake/Controller/Component/Acl/PhpAcl.php +++ b/lib/Cake/Controller/Component/Acl/PhpAcl.php @@ -49,8 +49,8 @@ class PhpAcl extends Object implements AclInterface { * @return void */ public function initialize($Component) { - if (!empty($Component->settings['ini_acl'])) { - $this->options = array_merge($this->options, $Component->settings['ini_acl']); + if (!empty($Component->settings['adapter'])) { + $this->options = array_merge($this->options, $Component->settings['adapter']); } App::uses('PhpReader', 'Configure'); diff --git a/lib/Cake/Test/Case/Controller/Component/Acl/PhpAclTest.php b/lib/Cake/Test/Case/Controller/Component/Acl/PhpAclTest.php index ec43d7687..b139ddf93 100644 --- a/lib/Cake/Test/Case/Controller/Component/Acl/PhpAclTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Acl/PhpAclTest.php @@ -33,7 +33,7 @@ class PhpAclTest extends CakeTestCase { $Collection = new ComponentCollection(); $this->PhpAcl = new PhpAcl(); $this->Acl = new AclComponent($Collection, array( - 'ini_acl' => array( + 'adapter' => array( 'config' => CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.php', ), )); @@ -299,7 +299,7 @@ class PhpAclTest extends CakeTestCase { */ public function testPolicy() { // allow by default - $this->Acl->settings['ini_acl']['policy'] = PhpAcl::ALLOW; + $this->Acl->settings['adapter']['policy'] = PhpAcl::ALLOW; $this->PhpAcl->initialize($this->Acl); $this->assertTrue($this->Acl->check('Role/sales', 'foo'));