Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
The old tests were relying on the fixed inherit bug. Instead check
a specific permission which will result in a deny.

Refs #8114
  • Loading branch information
markstory committed Feb 19, 2016
1 parent b2509ea commit 4389c79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/Cake/Model/Permission.php
Expand Up @@ -129,7 +129,6 @@ public function check($aro, $aco, $action = '*') {
$perms = Hash::extract($perms, '{n}.' . $this->alias);
foreach ($perms as $perm) {
if ($action === '*') {

foreach ($permKeys as $key) {
if (!empty($perm)) {
if ($perm[$key] == -1) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Console/Command/AclShellTest.php
Expand Up @@ -253,7 +253,7 @@ public function testCheck() {
$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'create');
$this->Task->check();

$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', '*');
$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'delete');
$this->Task->check();
}

Expand Down

0 comments on commit 4389c79

Please sign in to comment.