Permalink
Browse files

use more appropriate array key when passing options to the adapter

  • Loading branch information...
1 parent 6ddf6da commit ef5eead03806e9bf49d4e60452fca42992d38e2d @0x20h 0x20h committed Jan 13, 2012
@@ -49,8 +49,8 @@ public function __construct() {
* @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');
@@ -33,7 +33,7 @@ public function setUp() {
$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 @@ public function testAroDeclarationContainsCycles() {
*/
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'));

0 comments on commit ef5eead

Please sign in to comment.