Skip to content
This repository
Browse code

use more appropriate array key when passing options to the adapter

  • Loading branch information...
commit ef5eead03806e9bf49d4e60452fca42992d38e2d 1 parent 6ddf6da
Jan Kohlhof authored January 13, 2012
4  lib/Cake/Controller/Component/Acl/PhpAcl.php
@@ -49,8 +49,8 @@ public function __construct() {
49 49
  * @return void
50 50
  */
51 51
 	public function initialize($Component) {
52  
-		if (!empty($Component->settings['ini_acl'])) {
53  
-			$this->options = array_merge($this->options, $Component->settings['ini_acl']);
  52
+		if (!empty($Component->settings['adapter'])) {
  53
+			$this->options = array_merge($this->options, $Component->settings['adapter']);
54 54
 		}
55 55
 		
56 56
 		App::uses('PhpReader', 'Configure');
4  lib/Cake/Test/Case/Controller/Component/Acl/PhpAclTest.php
@@ -33,7 +33,7 @@ public function setUp() {
33 33
 		$Collection = new ComponentCollection();
34 34
 		$this->PhpAcl = new PhpAcl();
35 35
 		$this->Acl = new AclComponent($Collection, array(
36  
-			'ini_acl' => array(
  36
+			'adapter' => array(
37 37
 				'config' => CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.php',
38 38
 			),
39 39
 		));
@@ -299,7 +299,7 @@ public function testAroDeclarationContainsCycles() {
299 299
  */
300 300
 	public function testPolicy() {
301 301
 		// allow by default
302  
-		$this->Acl->settings['ini_acl']['policy'] = PhpAcl::ALLOW;
  302
+		$this->Acl->settings['adapter']['policy'] = PhpAcl::ALLOW;
303 303
 		$this->PhpAcl->initialize($this->Acl);
304 304
 
305 305
 		$this->assertTrue($this->Acl->check('Role/sales', 'foo'));

0 notes on commit ef5eead

Please sign in to comment.
Something went wrong with that request. Please try again.